microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.62k stars 28.39k forks source link

function "setBreakPointsRequest" in the Debug Adapter is triggered to much #126257

Open PaDebug opened 3 years ago

PaDebug commented 3 years ago

Does this issue occur when all extensions are disabled?: Yes

Hello,

currently I´m working on a debug adapter extension for microcontrollers (gdb) and I want to remove some breakpoints with the function from the vscode API: "vscode.debug.removeBreakpoints()". If call the function "vscode.debug.removeBreakpoints()" with the current list of breakpoints, it triggers the "setBreakPointsRequest(response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments) " from the debug adapter as many times as breakpoints in the list. If remove one breakpoint it gets triggered one time, two breakpoints two times and so on. Is that the normal behavior, because I remove every breakpoint every time the "setBreakPointsRequest" is called as in the debug protocol specification specified?

Used debugger: gdb.

Steps to reproduce:

  1. read the current list of breakpoints with "vscode.debug.breakpoints"
  2. remove the breakpoints with "vscode.debug.removeBreakpoints()"

Screenshot of debug console: image

vscodebot[bot] commented 3 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

weinand commented 3 years ago

Sounds like a bug. It should be possible to call the setBreakPoints request only once for a single call to vscode.debug.removeBreakpoints.