delve icon indicating copy to clipboard operation
delve copied to clipboard

service/dap: clear breakpoints before disconnecting for attach mode

Open hyangah opened this issue 1 year ago • 2 comments

Spin-off from https://github.com/go-delve/delve/issues/2958#issuecomment-1196787927

Original feature request: https://github.com/golang/vscode-go/issues/2368

While #2958 discusses a bigger refactoring work, we want to clear all breakpoints/logpoints before disconnecting. Related: https://github.com/go-delve/delve/issues/1961

We were told Goland explicitly issues the ClearBreakpoints command before exiting, which I think is a good default behavior.

For users who really want to keep the debug target running with breakpoints set, if any, we can consider this as a launch attribute optionally, but IMO that's unusual case.

cc @suzmue @polinasok

hyangah avatar Jul 28 '22 18:07 hyangah

Ah, should have added my update here, not at https://github.com/go-delve/delve/issues/2958#issuecomment-1203217300.

But basically last time we had a vscode-go/delve group chat about this, I was sort of pushing for clearing (because it would make the async logic covered in #2958 soooo much simpler), but the consensus was that we need to give users the flexibility both ways with an option to do either (keep or clear). Time to revisit that decision? :)

polinasok avatar Aug 02 '22 21:08 polinasok

@polinasok do you have any update on this? did you decide to do it?

OrBin avatar Aug 11 '22 07:08 OrBin