-
Notifications
You must be signed in to change notification settings - Fork 68
Subprocesses are not killed when stopping the debugger #503
Comments
@brettcannon Please could you assign a priority for this issue. |
Baseline fixes are more important (not sure how you want that flagged with the labels). |
Why is this in an icebox? I don't think it belongs in there. |
We have to discus how this should be handled now given that VSC will be able to connect to individual sub-processes. |
I don't think we can do anything here other than let the user code decide. Anything else will break some user scenario or the other - as you say, sometimes those child processes really are meant to be independent. |
Sounds like we need a spec @qubitron /cc |
The important thing is that for flask and django apps using auto-reload, that users can start and stop debugging without leaving orphaned processes alive occupying ports. Most are not aware that multiple processes are being used to do the auto-reload, so this would cause all sorts of frustration in the auto-reload scenario. Chatting with Don, the previous version of I'd say the default would be to kill child processes, it's generally safer to clean up things than to have unexpected processes running. If we receive user complaints we can add a setting to disable this behavior. |
I am adding this to sub-process debugging epic. |
@int19h Any recommendation on this, now that we have better implementation details :) |
@int19h @karthiknadig I could utilize the same code to fulfill the requirements of this GitHub issue very easily in VSC now, provided PTSD sends custom event that contains the process id along with the launch request (as you do today in Today a Long story short if you send a |
I'm confused - don't we already send all the PIDs (child, parent and root) for all the |
Isn't this event sent ONLY when
yes we do |
It is. But if multiprocessing mode is not enabled, then the debugger doesn't know about child processes at all, by design - so why would we want to autokill them? |
Yes. However if I could get just the parent process id (the main process), it would solve the problem for me. I could just tell the OS to kill all child processes. That's what I used to do with the old version of the debugger in VSC.
To meet the requirements of this Issue. |
@karthiknadig @int19h |
I would really like to remove the |
We had moved this out to next milestone due to unplanned work; bringing this back |
Fix #503: Subprocesses are not killed when stopping the debugger
child
) processes are not killed.In VS Code when using the older version of PTVSD (
3.0.0
), the Python Extension kills all child processes (https://github.com/Microsoft/vscode-python/blob/master/src/client/debugger/PythonProcess.ts#L69).Right now, this responsibility falls on PTVSD 4.x as it kills the process.
The text was updated successfully, but these errors were encountered: