Reputation: 21
I have a program that has several small methods (such as printing a line to the console for tracing, getter queries, etc).
Is there a way to flag these so when I'm stepping through debugging I don't enter these methods? (outside of setting breakpoints after each and every one)
Upvotes: 2
Views: 125
Reputation: 754735
You can avoid stepping into the method with the following combination
[DebuggerNonUserCode]
The second is default for most Visual Studio profiles. You can verify though by doing the following
Upvotes: 2
Reputation: 752
You can use F10 or the 'step over' button on the debug toolbox to step-over methods while you're debugging. This will prevent you from entering these methods unless an exception is thrown or you have a breakpoint inside of them.
Upvotes: 0