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. c++中的对象复制

    (1)this指针 this是一个隐含于每个类的成员函数的特殊指针,该指针是一个指向正在被某个成员函数操作的对象的指针. 当一个对象调用成员函数时,编译程序先将对象的地址赋给this指针,也就是说,当 ...

  2. 把IIS日志导入到数据库

    1.建表 CREATE TABLE [dbo].[inetlog0828]( [date] [date] NULL, ) NULL, ) NULL, ) NULL, ) NULL, ) NULL, [ ...

  3. struts xml中的result的类型、全局结果集、异常mapping、继承

    例子: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC     ...

  4. Java Collection之Queue具体解释及用途

    Queue是一种常见的数据结构,其主要特征在于FIFO(先进先出),Java中的Queue是这样定义的: public interface Queue<E> extends Collect ...

  5. FastDFS这种架构,如何配置?

    FastDFS这种架构,如何配置?才能让欧洲用户可以就近下载Storage Server1的文件,而不是到中国的Storage Server 2下载?

  6. 利用python进行泰坦尼克生存预测——数据探索分析

    最近一直断断续续的做这个泰坦尼克生存预测模型的练习,这个kaggle的竞赛题,网上有很多人都分享过,而且都很成熟,也有些写的非常详细,我主要是在牛人们的基础上,按照数据挖掘流程梳理思路,然后通过练习每 ...

  7. 通过Socket连接一次传输多个文件

    近期在做一个通过WIFI在手机之间传输文件的功能.须要在手机之间建立一个持久的Socket 连接并利用该连接数据传输.能够一次传输一个或多个文件. 在一次传输多个文件时,遇到了一个困难:怎样在接收文件 ...

  8. Entity Framework "There is already an open DataReader associated with this 的解决办法

    解决办法: 1,修改连接串,加上MultipleActiveResultSets=true 2, 一次性先把数据读出来 var contacts = from c in db.Contact sele ...

  9. JavaScript No Overloading 函数无重载之说

    在ECMAScript语言中,函数名字仅仅只是是一个指针(能够觉得是引用),以下的代码: "use strict"; function sum(a,b){ return a+b; ...

  10. 如何使用ip端口来浏览自己的网站

    现在做网站的朋友越来越多,域名注册后往往需要进行备案,而在备案期间我们的域名又不能正常打开,在服务器上直接编辑浏览我们的网站有些棘手,思来想去,在我们购买的服务器ip后面加上个端口来达到域名一样的效果 ...