-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debugpy maps properly the path for setting breakpoints, but not for module location (and thus cannot open the file using the call stack while debugging) #482
Comments
The logs aren't complete, so, I can't really diagnose this properly. In particular, I'm interested in the On a first glance I think that in this case one of the paths has more than one translation back and we just go with the first one found (the pydevd log should have more info on the actual targets and translations to be able to diagnose this better). Ideally your mapping should be an injective function, but if that's not possible, you should put the ones you want to match first earlier in that list. p.s.: please attach the log files to this issue instead of putting it in a |
El vie, 27 de nov de 2020 a las 05:22, Fabio Zadrozny
<notifications@github.com> escribió:
In particular, I'm interested in the pydevd log file. Can you provide
it?
How can I get those logs? Do they come from the container running
debugpy, or from the dev machine running vscode?
|
It should be generated in the server (where You should be able to set the |
OK, thanks. Here are the logs: debugpy.adapter-39.log Searching for
|
Were those logs helpful? Anything else I can do? |
I just took a look and I forgot to ask you to turn on the debugging of the actual translation. Can you rerun that setting the environment variable below and provide the new logs?
|
Actually, I've been able to setup a test where I can reproduce this. This is happening because the last I'll take a look into fixing that. As a workaround you can put the mapping:
as the last mapping so that it has less priority. |
I just tested installing |
Environment data
This is my launch configuration (there are several; the one that affects this issue is called "Attach Python debugger to running container"). You can see that it has lots of path mappings because this is a complex multi-root project.
Actual behavior
Full debug session logs. Relevant parts:
l10n_es_toponyms
module.odoo.addons.l10n_es_toponyms.tests.test_l10n_es_toponyms
module into/var/home/yajo/prodevel/doodba-devel-12.0/odoo/custom/src/odoo/addons/l10n_es_toponyms/tests/test_l10n_es_toponyms.py
instead of/var/home/yajo/prodevel/doodba-devel-12.0/odoo/custom/src/l10n-spain/l10n_es_toponyms/tests/test_l10n_es_toponyms.py
Expected behavior
When clicking on the stack trace, or just when the python code is being paused by the debugger, inside the
l10n-spain/l10n_es_toponyms/tests/test_l10n_es_toponyms.py:10
breakpoint, VSCode should properly open the file.Steps to reproduce:
Well, as you might have guessed this is not going to be "minimal", but well... this is so hard to trigger that this is what it takes 🤷:
First, you are expected to have these tools to be able to reproduce it:
sudo usermod -aG docker $USER
).pip install pre-commit invoke docker-compose
git clone -b 12.0 https://github.com/Yajo/doodba-devel.git doodba-devel-12.0 cd doodba-devel-12.0 invoke develop invoke img-pull img-build --pull git-aggregate resetdb -m l10n_es_toponyms code doodba.doodba-devel-12.0.code-workspace
Now that you opened the workspace in VSCode, and have all the code available:
l10n-spain/l10n_es_toponyms/tests/test_l10n_es_toponyms.py
file.cc @joao-p-marques
The text was updated successfully, but these errors were encountered: