在MSVC ++ 2010的逐步调试过程中自动跳过STL功能 [英] Auto-skip STL functions during step-by-step debugging in MSVC++2010

查看:96
本文介绍了在MSVC ++ 2010的逐步调试过程中自动跳过STL功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经常发生的是,我逐步调试程序。我通常总是使用逐步进入按钮停止我正在调试的部分的每一行,当我想我得到当前行时,只需再次单击。



然而,这个工作流程真正打乱了库调用。如果有像字符串长度计算或地图存储或类似的东西,调试器将跳转到一些STL文件并继续。然后我必须按跳出才能跳回到我正在看的程序。



这意味着:我从文档中感到中断,我感兴趣因为代码突然消失,STL源显示,其次因为我必须看按钮栏并移动鼠标,当我跳回来时,我通常有些困惑。



有没有办法阻止调试器打开STL源文件?某些黑名单,或者甚至更优雅,某些设置在某个地方?我迄今为止找到了一个只有我的代码设置,但它只适用于托管代码,并且使用本机代码。

解决方案

p>好的问题,调试器不断跳入一切确实是一个巨大的放缓和调试中的分心。幸运的是有一个解决方案:



打开你的注册表编辑器,导航到

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

在软件上添加\Wow6432Node,如果你是一台64位的机器,这让我以前头痛)。



添加一个新的字符串值(REG_SZ)。这个名字并不重要,为了清楚起见,我使用了 NoSTL ,并将其设置为

  std\\ \\:\:。* = NoStepInto 

这告诉调试器不要进入与正则表达式匹配的任何东西所以它将跳过std命名空间中的每个函数(全局和类级别)。
通过使用 StepInto ,您可以为特定方法添加覆盖,您仍然可以使用断点。添加一些您经常使用的方法,但您知道结果的方法也很方便。



这里是一个更详细的解释,google on NoStepInto 更多分散的信息。


It often happens that I debug through a program step-by-step. I generally always use the "step into" button to halt at every line in the section that I am debugging, and when I think I got the current line, just click again.

What's really disrupting this work flow, however, are library calls. If there's something like a string length calculation or a map storage or similar, the debugger will jump into some STL file and continue there. I then have to press "jump out" to skip back into the program I'm looking at.

This means: I get disrupted from the document I'm actually interested in, firstly because the code suddenly vanishes and the STL source is displayed, and secondly because I have to look at the button bar and move the mouse, and when I have jumped back, I'm usually somewhat confused.

Is there a way to prevent the debugger from opening STL source files? Some kind of blacklist, or maybe even more elegantly, some setting somewhere? I have so far found an "only my code" setting, but it only works for managed code and I work with native 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

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.

这篇关于在MSVC ++ 2010的逐步调试过程中自动跳过STL功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆