Breakpoints not shown when debugging from extension

Sajith 11 Reputation points
2024-10-28T09:19:02.7266667+00:00

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.

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
235 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.