How do I stop the debugger from showing code that I haven’t written?

My issue is that I don’t want the debugger to show me code provided in the standard library i.e. the <string> class or the <stack> class ect... It’s so easy to get lost while stepping through the program. I know that I could use the jump over but I'd rather the code never showed up in the first place. Any ideas



Answer this question

How do I stop the debugger from showing code that I haven’t written?

  • arby99

    Are you managed-debugging (eg, C#) or native-debugging (eg, C++)



  • Andrew W Cullen

    For managed-debugging, you're in luck. VS2005 has a feature called "Just-My-Code".

    The fx, mscorlib, stuff you don't have pdbs for is all considered "not my code" / "non-user code". You can also mark stuff as non-user code by placing a custom attribute on it.

    Stepping magically skips through non-user code. VS will also filter out non-user frames from the callstack (right click on the callstack window and select "hide external code" on the context menu)

    I think JMC is enabled by default. To enabled it , you can also:
    1) Go to Tools -> Options -> Debugging -> General
    2) Ensure ‘Enable Just My Code’ is also CHECKED.

    A JMC demo is here: http://blogs.msdn.com/jmstall/archive/2004/12/31/344832.aspx



  • jagannath119

    That didn’t work all the stuff is enabled and it still shows Microsoft library code. Do I have to open every single include and change it using the notusercode attribute


  • How do I stop the debugger from showing code that I haven’t written?