How can I avoid debugging into Boost source code in Visual Studio?

ぐ巨炮叔叔 提交于 2019-12-21 05:00:54

问题


Is there a way to exclude boost source code (or any other) from debuging? I don't want to step into boost internal source code.

for example:

boost::shared_ptr<Xyz> xyz(new Xyz());
xyz->someMethod();

when I want to step into Xyz::someMethod() using F11 the debugger first steps into boost/shared_ptr.hpp before I get into Xyz::someMethod()


回答1:


Launch regedit and navigate to the following key:

Under a 32bit OS:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\NativeDE\StepOver

Under a 64bit OS:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\NativeDE\StepOver

Create a new string value there. Name it as you wish. Enter this as a content:

boost\:\:.*

(You need to restart Visual Studio.)




回答2:


For Visual Studio 2012:

As described here, this information is stored in the file C:\Program Files[ (x86)]\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter

For boost::shared_ptr, this here has helped:

<Function><Name>boost::shared_ptr&lt;.*</Name><Action>NoStepInto</Action></Function>


来源:https://stackoverflow.com/questions/9037534/how-can-i-avoid-debugging-into-boost-source-code-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!