Auto-skip STL functions during step-by-step debugging in Visual Studio

后端 未结 3 1173
悲&欢浪女
悲&欢浪女 2020-12-24 14:43

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 c

3条回答
  •  盖世英雄少女心
    2020-12-24 15:38

    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

    HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\NativeDE\StepOver
    

    (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

    std\:\:.*=NoStepInto
    

    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 StepInto you 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 NoStepInto for more scattered information.

提交回复
热议问题