During step-by-step debugging, I often use “step into” to halt at every line in the section that I am debugging, to see all my code that’s executed.
But library calls can disrupt this work flow: The debugger will jump into some STL file and continue there. I then have to press “jump out” to go back to my own code.
Is there a way to prevent the debugger from opening STL source files? A blacklist or a setting somewhere? I work with native C++ code. The “only my code” debugger setting unfortunately only works for managed code.
good question, the debugger constantly jumping into everything is indeed a huge slowdown and distraction during debugging. Luckily there’s a solution:
open your registry editor, navigate to
(add \Wow6432Node after SOFTWARE if you’re on a 64bit machine, this casued me headaches in the past).
Add a new String Value (REG_SZ). The name is not so important, I used NoSTL for clarity and set it’s value to
This tells the debugger to not step into anything matching that regex so it will skip every function (global and class level) in the std namespace.
By using
StepIntoyou can add overrides for specific methods, and you can still use breakpoints off course. It’s also handy to add some of your own methods that get stepped into often but of which you know the result by head.Here is a more detailed explanation, google on
NoStepIntofor more scattered information.