You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there's an issue with debugging python code that utilizes multithreading.
i set a breakpoint, start debugging, execution pauses as expected, but when i press 'Step Over' (F10) debugger does not go to the next expression (line) in the current thread, but jumps to some random locations in other running threads, and i have to 'Step Over' again and again until i return to my current thread.
'Step Over' feature must be limited the current (paused) thread.
but i had to hardcode False into pydevd_process_net_command_json.py because i don't know where exactly i should put "steppingResumesAllThreads": false in launch.json. can you, please, explain it to me?
and one more thing: maybe there's also a parameter that keeps me Stepping Over inside my thread without pausing all other threads?
but i had to hardcode False into pydevd_process_net_command_json.py because i don't know where exactly i should put "steppingResumesAllThreads": false in launch.json. can you, please, explain it to me?
Karthik Nadig (@karthiknadig) You are correct that it's a separate debugger but that behavior is not what is expected even from a separate debugger.
I finally figured it out for a subprocess. It is a bug with the current version in debugpy, other users reported it as well.
Downgrading to 2024.10.0 solved the issue.
Activity
karthiknadig commentedon Dec 9, 2024
pub-pub in
debugpythe library there is a setting for this. Try adding this to the launch config:"steppingResumesAllThreads": falsepub-pub commentedon Dec 9, 2024
thanks a lot, Karthik Nadig (@karthiknadig)
it's working great
but i had to hardcode
Falseintopydevd_process_net_command_json.pybecause i don't know where exactly i should put"steppingResumesAllThreads": falseinlaunch.json. can you, please, explain it to me?and one more thing: maybe there's also a parameter that keeps me Stepping Over inside my thread without pausing all other threads?
karthiknadig commentedon Dec 9, 2024
pub-pub debugpy has lot more control over this, but I am not sure if there is a stop only current option yet. This might be a feature request on debugpy. You can ask for it here https://github.com/microsoft/debugpy
karthiknadig commentedon Dec 9, 2024
Even though it has the yellow line it should work.
maor-outrival commentedon Mar 19, 2025
Karthik Nadig (@karthiknadig) the same thing happens in a subprocess and using "steppingResumesAllThreads": false doesn't work. Any suggestions there?
karthiknadig commentedon Mar 19, 2025
Rich Chiodo (@rchiodo) Can you help with above?
Maor Azoulay (@maor-outrival) Each subprocess is a separate debugger session but still a sub-session. I don't think this is supported by
debugpy.rchiodo commentedon Mar 19, 2025
This should have been fixed. It was a bug in debugpy in 3.12 and above. The jumping between threads when stepping that is.
What's your version of debugpy (or debugger extension)? Debugpy 1.8.12 should have the fix for this.
See this debugpy bug:
microsoft/debugpy#1765
maor-outrival commentedon Mar 19, 2025
Karthik Nadig (@karthiknadig) You are correct that it's a separate debugger but that behavior is not what is expected even from a separate debugger.
I finally figured it out for a subprocess. It is a bug with the current version in debugpy, other users reported it as well.
Downgrading to 2024.10.0 solved the issue.
rchiodo commentedon Mar 19, 2025
Which bug? This should be fixed in our latest bits.