Debugging helps to understand how code works and what causes a bug. But it is not always easy to debug an application. Stepping into a method with parameters, for instance, can be difficult because you will first step into all the properties that are passed as arguments. You solve this problem by jumping to the definition of the method, setting a breakpoint in the method and pressing F5. You can use ‘Run to cursor’ also, of course. But if you have control over the source code you can use the DebuggerStepThroughAttribute to prevent the debugger stepping into the properties.

 The DebuggerStepThroughAttribute does not mean anything to the compiler. It is only there for debuggers. You can mark a method, a constructor, a class or a struct with it. The debugger will not step into the decorated construct. You can still set a breakpoint in marked constructs.