Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update:</strong> <em>OP initially didn't make it clear at the beginning unmanaged C++ was being used. So this answer is pretty useless now because it'll only work with managed code. That said I'll leave it be in case someone stumbles over it and finds it usefulor didn't know about JMC:</em></p> <p>Whilst <code>DebuggerStepThrough</code> is still a valid method to prevent stepping into code there are times when you do want to step in. This means having to locate and comment out the <code>DebuggerStepThrough</code> attribute.</p> <p>.NET 2.0 introduced a new attribute: <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.debuggernonusercodeattribute.aspx" rel="nofollow noreferrer"><code>DebuggerNonUserCode</code></a>. This works in conjunction with the <em>Debug Just My Code</em> setting in Tools->Options->Debugging->General->Enable Just My Code.</p> <p>If Enable Just My Code is checked then any method decorated with the <code>DebuggerNonUserCode</code> attribute won't be stepped into. If you do want to re-enable debugging of code marked with <code>DebuggerNonUserCode</code> periodically then just uncheck this setting. This saves some time having to locate and comment out code you'd normally not be interested in stepping through.</p> <p>To use either attribute just decorate the methods of your choosing like this:</p> <pre><code>// The .NET 1.1 way [DebuggerStepThrough] public static void IgnoreMeAlways() { Console.WriteLine("Hello...where is everybody!"); } //The .NET2.0/VS2005/2008 way. Use in conjunction with Debug Just My Code [DebuggerNonUserCode] public static void NonUserCodeSomeTimes() { Console.WriteLine("Longtime no see"); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload