It's often useful to avoid stepping into some common code like constructors or overloaded operators.

  Many times when you debug the code you probably step into functions you would like to step over, whether it's constructors, assignment operators or others. One of those that used to bother me the most was the CStringconstructor. Here is an example when stepping into take_a_string() function first steps into CString's constructor.

  

  Luckily it is possible to tell the debugger to step over some methods, classes or entire namespaces. The way this was implemented has changed. Back in the days of VS 6 this used to be specified through the autoexp.dat file.

  autoexp.dat provides this capability. Add a section called "[ExecutionControl]". Add keys where the key is the function name and the value is "NoStepInto". You can specify an asterisk (*) as a wildcard as the first set of colons for a namespace or class.

  autoexp.dat is only read on Visual Studio's start up.

  To ignore the function myfunctionname, and all calls to the class CFoo:

  [ExecutionControl]

  myfunctionname=NoStepInto

  CFoo::*=NoStepInto

  To ignore construction and assignment of MFC CStrings: (Notice the extra = in CString::operator=.)

  [ExecutionControl]

  CString::CString=NoStepInto

  CString::operator==NoStepInto

  To ignore all ATL calls:

  [ExecutionControl]

  ATL::*=NoStepInto

-------------------------------------------------------------------------分割线-----------------------------------------------------------------------------------------

  Since Visual Studio 2002 this was changed to Registry settings. To enable stepping over functions you need to add some values in Registry (you can find all the details here):

  • The actual location depends on the version of Visual Studio you have and the platform of the OS (x86 or x64, because the Registry has to views for 64-bit Windows)
  • The value name is a number and represents the priority of the rule; the higher the number the more precedence the rules has over others.
  • The value data is a REG_SZ value representing a regular expression that specifies what to filter and what action to perform.

  To skip stepping into any CString method I have added the following rule:

  

  Having this enabled, even when you press to step into take_a_string() in the above example the debugger skips the CString's constructor.

  Additional readings:

VC++Debug避免F11步进不想要的函数中的更多相关文章

  1. VC Debug和Release区别

    https://msdn.microsoft.com/en-us/library/xz7ttk5s.aspx   Optimizing Your Code Visual Studio 2015 The ...

  2. ES6 箭头函数中的 this?你可能想多了(翻译)

    箭头函数=>无疑是ES6中最受关注的一个新特性了,通过它可以简写 function 函数表达式,你也可以在各种提及箭头函数的地方看到这样的观点——“=> 就是一个新的 function”. ...

  3. 怎么查看CI,codeigniter的版本信息?想看某个项目中使用的CI具体是哪个版本,怎么查看?

    怎么查看CI的版本信息?想看某个项目中使用的CI具体是哪个版本,怎么查看?system\core\codeigniter.php中可以查看版本常量/** * CodeIgniter Version * ...

  4. python中,一个函数想使用另一个函数中的变量

    问题: 第一个函数中用到了变量a:第二个函数也想使用变量a. 解决方法: 在第一个函数中将变量a定义为全局变量,然后在第二个函数中,也写上global a即可. 示例: def func1(): gl ...

  5. 要想在for语句中直接定义一个变量

    要想在for语句中直接  定义一个变量  (如下的代码) 1 for(uint16_t i=0;i<10;i++); 2 if( GPIO_ReadInputDataBit(GPIOA, GPI ...

  6. VC++ Debug编译方式

    字节填充 VC++在Debug编译方式下,new的内存用0xcd(助记词为Cleared Data)填充,防止未初始化: delete后,内存用0xdd(Dead Data)填充,防止再次被使用. 这 ...

  7. windows下VC界面 DIY系列1----写给想要写界面的C++程序猿的话

    非常早就想写关于C++ UI开发的一系列博文,博客专栏刚审核通过,就立即開始刷博文,不能辜负自己的一番热血,我并非写界面的高手,仅仅想通过写博文提高我自己的技术积累,也顺便帮助大家解决界面开发的瓶颈. ...

  8. VC++ Debug产生异常时中断程序执行Break on Exception

    It is possible to instruct the debugger to break when an exception occurs, before a handler is invok ...

  9. VC++ Debug内存值

    Memory Values If you're using the debug heap, memory is initialized and cleared with special values. ...

随机推荐

  1. ionic 进入二级目录以后隐藏底部导航栏(tabs)

    1.在标签ion-tabs中添加:ng-class=”{‘tabs-item-hide’: $root.hideTabs}”,源码如下: <ion-tabs class="tabs-i ...

  2. 网页会计系统 FrontAccounting

    FrontAccounting (FA)是一个针对企业ERP供应链的网页会计系统.FA 允許多使用者.多語系和多國貨幣. FA允许多使用者.多语系和多国货币.FA接续OpenAccounting (O ...

  3. mongodb安装的两条命令

    1. 安装 下载并安装,注意安装方式为custom,路径自定义(d:\chengxu\mongodb),安装成功后在mongodb文件夹下新建data文件夹(内新建db文件夹)和logs文件夹(内新建 ...

  4. git 教程一

    git 是一个开源的分布式版本控件系统,用于敏捷高效地处理任何或小或大的项目. Git是Linus Torvalds为了帮助管理Linux内核开发而开发的一个开放源码的版本控制软件. Git 与常用 ...

  5. rownum使用说明

    参考:http://www.blogjava.net/conans/articles/219693.html 参考:http://www.blogjava.net/freeman1984/archiv ...

  6. Linux下双网卡-双外网网关-电信联通双线主机设置

    1.实现:通过运营商提供的智能DNS,把电信用户访问时,数据进电信的网卡,出来时也从电信的网关出来,访问联通时,从联通网卡时,联通网卡出.这样速度就会快,实现双线主机的功能. 2.网卡信息:电信IP( ...

  7. Phone

    User-Agent Switcher for Chrome EditThisCookie cornerstone SVN

  8. 点滴积累【C#】---Highcharts图形统计

    效果: 思路: 后台获取数据!然后拼接为前台所要求的格式,再将拼接好的StringBuilder给了hidden控件! 然后前台获取JQuery获取Hidden的值,最后将值赋给图形! 代码: [前台 ...

  9. Atiti. Php Laravel 5.1 环境搭建以及  error 排除

    Atiti. Php Laravel 5.1 环境搭建以及  error 排除 1. php_5.6.11_apache2.41 1.1. Httpd.Conf增加以下配置,添加php支持1 1.2. ...

  10. erlang supervisor simple_one_for_one实例

    simple_one_for_one vs one_for_one: 相同点: 这种Restart Strategy和one_for_one基本相同(即当一个child process挂掉后,仅仅重启 ...