Breakpoints not shown when debugging from extension
I am working on a Visual Studio extension that implements a custom editor, language service and a debugger. When running the debugger, breakpoints set are not shown in editor margin. All other breakpoint functionality works fine -
- Breakpoints are correctly shown when not debugging
- When debugging starts, none of the breakpoints are marked on the code editor
- Breakpoints window shows these breakpoints. We can click on them and navigate to the location in code editor
- Otherwise, all breakpoint functionality works fine. Debugger breaks at the breakpoint.
Once debugging starts and the source is loaded, we are sending a
- IDebugBreakpointBoundEvent2 to the SDM for this breakpoint with state as ENABLED.
- IDebugEventCallback2.Event gets called for IDebugBreakpointBoundEvent2
- IDebugBreakpointBoundEvent2.GetPendingBreakpoint and IDebugBreakpointBoundEvent2.EnumBoundBreakpoints gets called which return the breakpoint bound correctly
- IDebugBoundBreakpoint2.GetPendingBreakpoint
- IDebugBoundBreakpoint2.GetBreakpointResolution
- IDebugBreakpointResolution2.GetResolutionInfo
All these methods get called multiple times and we are processing them correctly with the state of breakpoint set to ENABLED. But the breakpoint is not visible in code editor.
This used to work fine earlier. Seems the issue started with one of the last few VS2022 updates.
Any pointers on how to get this working would be of great help.