Replies: 1 comment 2 replies
-
Debugging subprocesses in Debugpy is handled by monkey patching the code that starts subprocesses. You can see it here: I was thinking there might need to be more patching for groups, but looking at it now, I'm not sure why it wouldn't just work. Attach AFAIK does the monkey patching too as long as you have So I'm not sure why it doesn't already work. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know I can debug all subprocesses by modifying the main process startup code to import debugpy. However, is there a way to attach to and debug an entire process group after both the main process and subprocesses have already started?
Currently, my approach is to attach to each process individually:
However, this creates separate, isolated debug sessions for each process. Is there any way to achieve the same unified debugging experience as when debugpy is imported at the main process startup (with subProcess=True)? Ideally, I'd like to:
Attach to an already-running process group
Have all subprocesses automatically included in a single coordinated debugging session
Avoid having to manually attach to each subprocess with separate ports
Is this possible with debugpy's current architecture, or would this require creating a custom wrapper/tool?
Beta Was this translation helpful? Give feedback.
All reactions