Per the DAP spec for SetBreakpoints [1], the way to clear breakpoints is: To clear all breakpoint for a source, specify an empty array.
However, leaving the breakpoints field unset is also a well formed request (note the breakpoints?: in the SetBreakpointsArguments definition). If it's unset, we have a couple choices:
- Crash (current behavior)
- Clear breakpoints
- Return an error response that the breakpoints field is missing.
I propose we do (2) instead of (1), and treat an unset breakpoints field the same as an empty breakpoints field.
[1] https://microsoft.github.io/debug-adapter-protocol/specification#Requests_SetBreakpoints
you might want to add one additional breakpoint here to make the test more robust