delve
delve copied to clipboard
dap: how to treat terminateDebuggee==true with remote attach to multi-client dlv-attach
I have a draft of a fix, but would like to discuss first if the current behavior even needs fixing.
Current behavior:
- local attach to pid or remote attach to headless
dlv attach
:- "Disconnect" =>
terminateDebuggee=false
=> kill debugger, leave process (running) - "Stop" =>
terminateDebuggee=true
=> kill debugger, kill process
- "Disconnect" =>
- remote attach to headless
dlv attach
with--accept-multiclient
:- "Disconnect" =>
terminateDebuggee=false
=> leave debugger, leave process (halted or running) - "Stop" =>
terminateDebuggee=true
=> kill debugger, kill process
- "Disconnect" =>
Question: should multi-client Stop leave the attached debuggee process running when the debugger stops?
- Pro: Gives the user the most flexibility. It is trivial to kill a left-over process. It is not as easy to take down the debugger and leave the proccess running (need to use a terminal client).
- Con: "Stop" and "terminateDebuggee" imply that the process will be terminated, so leaving it running might be unintuitive.
@suzmue @hyangah @briandealwis
In the disconnect cases, does “leave process” mean that the process is left in a running state?
My $0.02: “Stop” means terminate the process, regardless of multiclient. The multiclient case is only interesting in that it allows for disconnect as an option.
In multi-client case "leave process" can mean running or halted, but that's controlled by a separate flag.