Reputation: 10919
First, there is this question:
Can I break in a method marked with DebuggerStepThrough attribute?
While it may be a dupe, it's over 4 years old, has one question which doesn't appear to be accurate, and is for a different version of VS than what I'm using which is 2013.
Is it possible to mark a method with DebuggerStepThrough
but also be able to step into it either by setting a breakpoint or using some other keyboard shortcut? I do not want to have to remove the attribute.
Upvotes: 5
Views: 1239
Reputation: 1774
Using VS2017; I have marked my class with [DebuggerStepThrough], so the debugger steps over all the code in the class.
However, I recently added a new method, and wanted to focus just on this one. The debugger will ignore any breakpoints because of the "DebuggerStepThrough" attribute on the class.
To get the debugger to stop there were 2 options;
It would be nice if I could mark a single method within the class with a [DebuggerStepThrough(false)]!!! But this method works without touching the original code...
Upvotes: 3