Provide an option to disable the debugger 'stop' option for 'attach' debug configurations
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 18h 40m
- Merged PRs (30d)
- 31
Description
For 'attach' debug configurations, when debugging, by default there is only a 'detach' button visible in the toolbar, however in the dropdown next to it, 'stop' is also available - which means the external process being debugged can be terminated by VS Code. If the user were to mistakenly use 'stop' instead of 'detach' then then VS Code would kill that process, and the user could lose unsaved work.
Since the process being debugged was not started by VS Code, it seems appropriate that there should be a way of specifying (perhaps in the debug configuration in launch.json) that this process should *never* be terminated by the debugger.
Something along the lines of:
`"allowTerminateDebuggee": false`
Which would result in the 'stop' option being removed from the GUI.
There may well be other reasons that a debuggee could need to be protected against being terminated by VS Code, however in this case it is losing unsaved work that is my concern. Users of our software are able to use VS Code to develop and debug code that is used in the projects they create using our software. However, if during a debug session they accidentally choose 'stop' (perhaps because there are other scenarios in which they would be used to doing this), they would lose any unsaved work in their project.
Contributor guide
Assessment
This issue has not been assessed yet.