MS Visual C ++ 2010-步入(F11)跳得太深 [英] MS Visual C++ 2010 - step in (F11) jump too deep

查看:118
本文介绍了MS Visual C ++ 2010-步入(F11)跳得太深的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

步骤1)启动新的win32控制台应用程序;
步骤2)编写如下代码:

step 1) Start new win32 console application;
step 2) Write code like that:

CClass* c1 = new CClass();


步骤3)将断点放在步骤2中编写的行上;
第4步)开始调试;
第5步)按F11(步入").
现在我们可以看到我们跳入了"new.cpp".我可以自定义调试器,以使其不介入""new.cpp"之类的系统文件吗?

p.s.对不起,我的英语...


step 3) Place breakpoint on line written in step 2;
step 4) Start debug;
step 5) Press F11 ("step in").
Now we can see that we jumped in "new.cpp". Can I customize the debugger so that it does not "step in" into system files like "new.cpp"?

p.s. sorry for my english...

推荐答案

您可以在注册表中定义这些键,并利用Visual Studio中的官方不支持的功能".

链接取决于您运行的Visual Studio版本以及使用的是32位还是64位OS.

对于32位系统上的Visual Studio 2008:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ VisualStudio \ 9.0 \ NativeDE \ StepOver

对于64位系统上的Visual Studio 2008:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ VisualStudio \ 9.0 \ NativeDE \ StepOver

您应该会在该位置看到一些条目.

添加以下字符串条目,您将跳过对new的调用:

键:跳过运算符新增
类型:REG_SZ
值:运算符new


此功能支持正则表达式以跳过MFC CString调用,stl,boost等.

如果您使用的Visual Studio版本不同,则通常只需要调整版本号即可,除了VS2003和VS6以外,它们具有完全不同的键.但是功能也在那里.

问候
You can define these keys in the registry and take advantage of this "officially unsupported feature" in Visual Studio.

The link depends on what version of Visual Studio you are running and if you are using a 32-bit or 64-bit OS.

For Visual Studio 2008 on a 32-bit system:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\NativeDE\StepOver

For Visual Studio 2008 on a 64-bit system:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\NativeDE\StepOver

You should see a few entries already populated at that location.

Add the following string entry, and you will skip over the calls to new:

Key: Skip Operator New
Type: REG_SZ
Value: operator new


This feature supports regular expressions to skip over MFC CString calls, stl, boost etc.

If you have a different version of visual studio, you generally just need to adjust the version number, except for VS2003 and VS6, they have entirely different keys. But the feature is there as well.

Regard


我相信有一个选择,但是我忘记了它到底是什么.另一方面,为什么不将断点放在CClass的构造方法中呢?那是您想看看的地方吗?

祝你好运!
I believe there is an option for that but I forgot what exactly it was. On the other hand, why not put your breakpoint in the constructor method of your CClass? That is where you want to have a look right?

Good luck!


这篇关于MS Visual C ++ 2010-步入(F11)跳得太深的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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