有没有办法自动避免步入到Visual Studio中的某些功能? [英] Is there a way to automatically avoiding stepping into certain functions in Visual Studio?
问题描述
我知道只启用我的代码调试选项,但只适用于托管代码。
我正在寻找一种方法来例如,一个STL字符串转换操作符,因为有一个从char *到函数的参数之一的字符串的隐式转换。
我发现此博客条目< a>其具有解。虽然我宁愿能够说不要进入任何不是这个项目的一部分,这看起来可行。
编辑:在几个博客和新闻组,方法是为每个功能添加一个条目,你不想进入这个注册表项下(假设VS 2005):
32位Windows
\\HKEY_LOCAL_MACHINE\Software \Microsoft\VisualStudio\8.0\NativeDE\StepOver
< b> 64位Windows
\\HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\8.0\NativeDE\StepOver
路径的版本号:
Visual Studio 2005:8.0
Visual Studio 2008:9.0
Visual Studio 2010:10.0
Visual Studio 2012:11.0
Visual Studio 2013:12.0
此键包含一组影响如何执行步进的规则。每个规则都被指定为一个单独的条目,其名称是一个十进制数,其值是一个函数名模式,用于指定我们要影响的函数。例如
10=boost\:\:scoped_ptr。* \:\:。* = NoStepInto
阻止进入boost :: scoped_ptr函数。
从高到低的值,直到找到匹配模式,或没有规则留下。
冒号需要引用。
函数名称是正则表达式。带有反斜杠。
您可以指定StepInto以及NoStepInto。这样可以避免在同一作用域/命名空间中步入所有的函数。
重新启动Visual Studio以获取注册表的更改。 p>
I'm aware of the "Enable just my code" debug option, but that only works for managed code.
I'm looking for a way to step into a function call without having to step through, for example, an STL string cast operator because there is an implicit conversion from a char* to a string in one of the function's parameters.
I found this blog entry which has a solution. Although I'd prefer to be able to say "don't step into anything that isn't part of this project", this looks workable.
EDIT: After looking at a few blogs and newsgroups, the method is to add an entry for each function that you don't want to step into under this registry key (assuming VS 2005):
32 bit Windows \\HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\NativeDE\StepOver 64 bit Windows \\HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\8.0\NativeDE\StepOver
Version numbers for the path:
Visual Studio 2005: 8.0 Visual Studio 2008: 9.0 Visual Studio 2010: 10.0 Visual Studio 2012: 11.0 Visual Studio 2013: 12.0
This key contains a set of rules which affect how stepping is performed. Each rule is specified as a separate entry whose name is a decimal number and whose value is a function name pattern that specifies which functions we want to affect. e.g.
"10" = "boost\:\:scoped_ptr.*\:\:.*=NoStepInto"
prevents stepping into boost::scoped_ptr functions.
The rules are evaluated from high to low values until a matching pattern is found, or there are no rules left. In that case the function is stepped into.
Function names are regular expressions.
Colons need to be quoted with a backslash.
You can specify StepInto as well as NoStepInto. This gives you a way to avoid stepping into all but a few functions in the same scope/namespace.
Restart Visual Studio to pick up the changes to the registry.
这篇关于有没有办法自动避免步入到Visual Studio中的某些功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!