Sometimes there are methods in code that my development department knows are robust. There are no bugs in the code. This might be helper methods that have been tested time and time again. Therefore we know we dont need to debug these methods 99% of the time. To alleviate the pain of stepping through unnecessary lines of code accidentally you can inform the debugger that it is not suppossed to access a block of code. To do this add the DebuggerHidden Attribue. You cannot set a break point in this block of code when this attribute is present.
[DebuggerHidden]
void DoSomething()
{
// Do Something
}
*Note: This is only valid on constructors, methods, properties, and indexers only.
Leave a Reply
You must be logged in to post a comment.