Attribute to Skip over a Method while Stepping in Debug Mode

C#.NetDebuggingAttributes

C# Problem Overview


Is there an attribute I can use on a method so that when stepping through some code in Debug mode the Debugger stays on the outside of the method?

C# Solutions


Solution 1 - C#

 [DebuggerStepThrough]

(docs)

Solution 2 - C#

Not forgetting to add:

using System.Diagnostics;

Solution 3 - C#

It's written <DebuggerStepThrough> in VB.NET.

To use it just put on top of the method like :

<DebuggerStepThrough>
Private Sub form_Paint(sender As Object, e As PaintEventArgs) Handles form.Paint
     ' Picasso
End Sub

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBuddyJoeView Question on Stackoverflow
Solution 1 - C#Andrew RollingsView Answer on Stackoverflow
Solution 2 - C#BenView Answer on Stackoverflow
Solution 3 - C#BaSsGazView Answer on Stackoverflow