When we want to avoid tracing a method in debugger, we can add attribute DebuggerStepThroughAttribute. If a method will be marked by the attribute, then debugger (Visual Studio) will not trace into the method (by command "Step Into") and breakpoint will not be enabled in body of the method.
Sample:
Method Method_not_Debugable() is marked by attribute DebuggerStepThroughAttribute and we cannot trace it by debugger's command "Step into" and set breakpoint inside the method.
Output:
Reference:
DebuggerStepThroughAttribute Class
No comments:
Post a Comment