You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Does setBreakpoints trigger multiple breakpoint events? #434
The breakpoint event says that it "indicates that some information about a breakpoint has changed." Does this only include changes that were internally triggered by the debug adapter, or also changes were triggered externally, like by a setBreakpoints request? For example, if the IDE sends a setBreakpoints request with 5 elements in arguments.breakpoints, should the IDE expect to immediately receive 5 separate breakpoint events from the debug adapter in addition to the setBreakpoints response?
FWIW, the DAP implementation in gdb emitted events in this situation, and we ended up removing them because some clients were not expecting them and would display breakpoints twice.
No. I suggest the following change to clarify this:
interfaceBreakpointEventextendsEvent{event: 'breakpoint';body: {/** * The reason for the event. * - `changed` indiciates that a breakpoint previously sent to the client * has been updated. * - `new` and `removed` indicate that a breakpoint has been added or * removed by the adapter or client action outside of a `setBreakpoints` * request. The client should update its breakpoint list accordingly. * * Values: 'changed', 'new', 'removed', etc. */reason: 'changed'|'new'|'removed'|string;/** * The `id` attribute is used to find the target breakpoint, the other * attributes are used as the new values. */breakpoint: Breakpoint;};}
* - `changed` indiciates that a breakpoint previously sent to the client
* has been updated.
* - `new` and `removed` indicate that a breakpoint has been added or
* removed by the adapter or client action outside of a `setBreakpoints`
* request. The client should update its breakpoint list accordingly.
The qualifier by the adapter or client action outside of a setBreakpoints request. The client should update its breakpoint list accordingly. could just apply to 'changed' too right?
True, my thinking was it'd be useful for clients to explicitly call out that it's creating/destroying client-side breakpoints, inverting the normal flow of things, since that isn't a common flow implementors would necessarily think about.
The client should update its breakpoint list accordingly.
Text like this should be clear how it affects what is sent in subsequent setBreakpoints requests. Today I found that changed does not affect the data VS Code sends when adding new breakpoints to the file. I'm not sure if that's a bug or not. I've filed #545 for clearer docs in this area
Activity
tromey commentedon Sep 22, 2023
FWIW, the DAP implementation in gdb emitted events in this situation, and we ended up removing them because some clients were not expecting them and would display breakpoints twice.
pointhex commentedon Sep 22, 2023
I'm relying on them actually. But if it is not supposed to work like that I will change my logic.
connor4312 commentedon Aug 7, 2024
No. I suggest the following change to clarify this:
connor4312 commentedon Aug 7, 2024
fyi roblourens
roblourens commentedon Aug 9, 2024
Any reason to break out 'changed' in here?
The qualifier
by the adapter or client action outside of a setBreakpoints request. The client should update its breakpoint list accordingly.could just apply to 'changed' too right?connor4312 commentedon Aug 9, 2024
True, my thinking was it'd be useful for clients to explicitly call out that it's creating/destroying client-side breakpoints, inverting the normal flow of things, since that isn't a common flow implementors would necessarily think about.
DanTup commentedon Jun 3, 2025
Text like this should be clear how it affects what is sent in subsequent
setBreakpointsrequests. Today I found thatchangeddoes not affect the data VS Code sends when adding new breakpoints to the file. I'm not sure if that's a bug or not. I've filed #545 for clearer docs in this area