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:

最新文章

  1. [stm32] SIM808模块之发短信\GPS\TCP\HTTP研究
  2. Java基础以及与C++的一些对比
  3. Python PEP 492 中文翻译——协程与async/await语法
  4. STL--list
  5. MVC框架个人浅析
  6. display:table标签来自动改变列宽 改变的同时table的整体宽度跟随变化
  7. java io基础(java.io)
  8. 菜鸟帮你跳过openstack配置过程中的坑
  9. MQ、JMS以及ActiveMQ 关系的理解
  10. distcc (dcc_execvp) ERROR: failed to exec XX: Permission denied
  11. 163邮箱 SMTP发送邮件注意点
  12. SpringIOC原理简述
  13. Ajax获取Json多个集合并同时遍历
  14. 朴素贝叶斯分类器及Python实现
  15. CSS —— 选择器
  16. List stream 对象 属性去重
  17. CentOS7 下 配置Docker远程访问 与 windows下使用maven构筑Spring Boot 的 Docker镜像到远程服务端
  18. flask-migrate库的使用
  19. HDUOJ1086You can Solve a Geometry Problem too
  20. window.location.href = basePath + "paper/deleteExpertComment.action?expertId="+$(this).prev().val();

热门文章

  1. 使用caffe的HDF5数据完毕回归任务
  2. js操作当前窗口
  3. 回调函数callback使用例子
  4. 【微信小程序】微信小程序wx.previewImage预览图片
  5. MAC-Zsh安装与使用——终极Shell
  6. CSS-常用媒体查询
  7. 【前端】HTML
  8. 强大的响应式jQuery消息通知框和信息提示框插件
  9. 多线程-Condition
  10. matplotlib之极坐标系的极径网格线(rgrids)的显示刻度