-
Notifications
You must be signed in to change notification settings - Fork 145
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
Debug in python jump in other threads code while debug step by step #1792
Comments
I verified that this bahaviour is not present with version of python debugger 2024.0.0 |
I can confirm the same issue with debugpy using the vscode python debugger.
When running the multi-threaded python program with debugger and breakpoint, it shows the following when stopped on the breakpoint: The program stops on the breakpoint, and then steps once in a secondary thread, causing the 'paused on step' without my interaction. VSCode will show the usual yellow arrow and highlighted line in the file of the second thread (logger). The program is also stopped on the breakpoint (initial stopping cause), but does not open the file to indicate the location. I have to manually open the file with breakpoint, which is also indicating the stopped location (at the breakpoint) with the yellow highlight and arrow once opened. As @EnricoBeltramo mentions, the issue does not exist on 2024.0.0. Thanks |
I'm facing the same problem. The debugger randomly jumps to another thread's line, even though there is no breakpoint. Is there any way to fix this? It makes debugging impossible. Edit: I've downgraded debugpy to version 2024.10.0, it works as expected. |
This should be a dupe of #1765. If downgrading to 2024.10.0, fixes it, it must be something with the new sys.monitoring support. Another temporary workaround would be to use 3.11 instead of 3.12 as that usess the old code path. |
Does this issue occur when all extensions are disabled?: Yes/No yes
After year that I use vscode without problems to debug python, in latest versions I have problem placing breakpoints in a python multithread program. I have a program with many background threads and now when I set a breakpoint in one of those thread, the ide first break in correct point, after immediately jump in a point in other threads that I'm not interested in, making the debugger unusable. Is a new behaviour? Can be avoided?
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: