在Visual Studio 2012中调试C ++代码时是否跳过STL代码? [英] Skip STL Code when debugging C++ Code in Visual Studio 2012?
问题描述
在Visual Studio 2012中使用C ++调试器(本机,x64)时,是否可以跳过STL代码?在调试C ++代码时,我经常进入STL代码。我希望Microsoft提供的STL代码是正确的-我对调试它不感兴趣-我仅对调试自己的(自写)代码感兴趣。
对于在此函数处设置断点时的不稳定:
foo(std :: make_shared< int>(6));;
其中foo被定义为:
void foo(std :: shared_ptr< int> x)
{
//做某事
}
我不想深入了解std :: make_shared的细节-我想要的是直接进入函数foo。但这似乎是不可能的。如果到达 foo(std :: make_shared< int>(6));
处的断点,然后按进入按钮(或F11),它将首先进入内存头文件(STL):
因此,我再次按下 Step Out按钮,而不是再次按下 Step Into按钮进入 foo
函数。我想要的是跳过与STL相关的参数初始化,或者直接跳入函数。
其中有具体步骤
在右键菜单上可用:
尽管只有一个参数,但我经常会执行进入
+ 退出
+ 从键盘进入
,而不是导航具体步骤
。
Is it possible to skip STL Code when using the C++ debugger (native, x64) in Visual Studio 2012? Quite often when debugging C++ code I step into STL code. I expect that the STL code provided by Microsoft is correct - I am not interested in debugging it - I am only interested in debugging my own (self-written) code.
For instacne when setting a break point at this function:
foo(std::make_shared<int>(6));
where foo is defined as:
void foo(std::shared_ptr<int> x)
{
// do something
}
I do not want to dive into the details of std::make_shared - what I want is to step directly into the function foo. But this seems not to be possible. If the breakpoint at foo(std::make_shared<int>(6));
is reached and I press the 'Step Into' button (or F11) it first steps into the 'memory' header file (STL):
So again I have to press the 'Step Out' button than again the 'Step Into' button to get into the foo
function. What I want is to skip the STL related parameter initialization or a possibility to jump directly into the function.
There's Step Into Specific
available on the right-click menu:
Though for a single argument, I'll more often do Step Into
+ Step Out
+ Step Into
from the keyboard instead of navigating the menus for Step Into Specific
.
An unofficial registry key for always stepping over certain code is described in an MSDN blog post, How to Not Step Into Functions using the Visual C++ Debugger.
这篇关于在Visual Studio 2012中调试C ++代码时是否跳过STL代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!