Visual Studio 2022 Unable to set breakpoint on function header due to UI

Viewed 1793

I have recently updated from Visual Studios 2019, to Visual Studios 2022

In the previous version of Visual Studios 2019, I was able to set breakpoints on single line functions, -- but simply putting the breakpoint at the function definition itself -- As shown below:

Visual Studios 2019 Breakpoint on function

However, after installing to 2022, now this space has been taken up by a new button, that is now blocking my attempt

Visual Studio 2022 Unable to set breakpoint on function

Is there any way to remove these new added "Implemented Members" button, or to add breakpoint overtop of them?

2 Answers

Under Debug->Options->Text Editor->C#->Advanced

If you scroll to the very bottom, and uncheck "Combine inheritance margin with indicator margin, you are now able to set breakpoints again at the function level.

Picture of Inheritance Margin setting that can be unchecked

After unchecking the thing above, now can set breakpoints at the function header, and keep the inheritance margin feature:

Now able to set breakpoint at function header

Pressing F9 while your cursor is on the line in question will set a breakpoint. However, when the inheritance indicator is present, the breakpoint is still obscured and it's difficult to see whether it has been hit.

Related