I suggest you ...

allow breakpoint on method signature

Previous versions of Visual Studio (up to 2013) allowed me, when not running, to set a breakpoint at the method signature line of a C# method. At debug time, these breakpoints would shift to the open brace. Upon resuming non-debug mode, these breakpoints would shift back to their original location (on the method signature line).

In Visual Studio 2015, when I try this, the breakpoint jumps to the line containing the open brace even when I'm in non-debug mode. This is inconvenient. When debugging an entire class, I often put a breakpoint at every method. This used to be easy to do and to verify -- I would just collapse all the methods (CTRL+M, CTRL+O) and then add the breakpoints and verify that they're all set. Since collapsing hides the open brace, this new behavior of Visual Studio defeats these rather useful techniques.

1 vote
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Michael Gunter shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

3 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • birbilis commented  ·   ·  Flag as inappropriate

    OOPS, something fishy is happening here on VS2017. At constructor it does allow you to place the breakpoint on the method signature so that when collapsed you can still see it has breakpoint set, but at methods it doesn't, it moves the breakpoint to the starting {

    btw, showing a ghost breakpoint symbol (maybe like a hollow pale-red circle that can show arround a method-signature breakpoint would be nice to signify that a method has some breakpoint in its body (in case it is collapsed). It still isn't alternative for allowing to add on the method signature a breakpoint (you need to know when it is collapsed that it will break immediately upon entry)

  • birbilis commented  ·   ·  Flag as inappropriate

    looks like it is working as you expected in VS2017 - btw, I'm posting a new suggestion on toggling breakpoints for all methods (including property accessors) from the class name line

Feedback and Knowledge Base