Skip Extension Methods when Debugging
Your projects might have a few extension methods that aren't worth stepping through line by line. If you're navigating a call stack with F11, you might be unexpectedly taken away to another file containing extension methods that are there for convenience, not for logical reasons.
Consider the following (contrived) extension method:
[DebuggerStepThrough]
public static string Important(this string self)
{
return self + "!";
}
With the added [DebuggerStepThrough]
attribute, you will no longer navigate to that method when stepping through your code with F11.
For more details: http://msdn.microsoft.com/en-us/library/system.diagnostics.debuggerstepthroughattribute.aspx
Written by Chris Missal
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#