microsoft / vscode-python-debugger

Python debugger (debugpy) extension for VS Code.
https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy
MIT License
57 stars 24 forks source link

Kill all subprocesses when main process is killed #208

Open apanariello4 opened 8 months ago

apanariello4 commented 8 months ago

vscode: 1.86.1 python: 3.11.5 python-debugger: v2024.1.10371006

When debugging inside part of code with multiple processes (e.g., inside get_item of pytorch dataset), multiple subprocesses are found, and one can switch between those. However, when killing the main process, all other subprocesses are kept alive, and the debugger hangs, waiting for all to be killed or continued.

Adding a feature that kills all subprocesses when the main is killed would be helpful to avoid having to spam the stop button.

paulacamargo25 commented 4 months ago

Thanks for the feature request! We are going to give the community 60 days to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

kalingibbons commented 1 month ago

I gave this one a 👍 , but I think it has more to do with the small debug-panel on the top. Before the debugpy integration, hitting the stop button or refresh button would terminate the main process. Now I have to open the debug panel, scroll to the top process, then interact with the buttons in the hovers to restart my debug sessions. Would love a configurable option to have my hotkeys always operate on the main process.