vscode: Debugger: Add option to allow disconnect and stop/terminate UI elements
Currently VSCode will present only “stop” or “disconnect” button in a debug session, depending on “request” value in launch.json (launch or attach).
There a re cases where the user would like to choose for them selves if they need a STOP operation (terminating the execution of the debugee) or DISCONNECT (allowing the debugee to run free).
This would probably not require any changes to DAP. There is already a supportTerminateDebuggee
flag that could be used to offer both options (disconnect / stop).
Or at least add a vscode command and menu entry like in Visual Studios Detach All
.
Let me know if I can provide more context.
Thank you.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 26 (24 by maintainers)
Commits related to this issue
- #116731 — committed to microsoft/vscode by isidorn 3 years ago
I have coded up what we have agreed upon. The following gif shows these in practice (in the last part I am holding down the
alt
key). @zobo it would be great if you can try this out once it is in Insiders from next week and let us know how it goes.No, if a DA opts into supporting a
terminate
request then this and thedisconnect
request are not redundant.The
disconnect
request (with a “true” valuedterminateDebuggee
) terminates a debuggee forcefully without giving it a chance to clean up properly (or even veto the termination).The
terminate
request can be used to trigger a “soft” termination of a debuggee, which the debuggee can intercept to do some cleanup work. While doing this the debuggee can still be debugged and the debuggee can even decide to ignore the terminate and continue execution.To learn how node-debug supports the
terminate
request please see https://github.com/microsoft/vscode/issues/54384.At least from a technical standpoint
disconnect
is also possible inlaunch
scenario for PHP. I would agree with 1. 2. and 3. as these introduce new functionality without disrupting the current UI.