VC++Debug避免F11步进不想要的函数中
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 CString
constructor. 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步进不想要的函数中的更多相关文章
- VC Debug和Release区别
https://msdn.microsoft.com/en-us/library/xz7ttk5s.aspx Optimizing Your Code Visual Studio 2015 The ...
- ES6 箭头函数中的 this?你可能想多了(翻译)
箭头函数=>无疑是ES6中最受关注的一个新特性了,通过它可以简写 function 函数表达式,你也可以在各种提及箭头函数的地方看到这样的观点——“=> 就是一个新的 function”. ...
- 怎么查看CI,codeigniter的版本信息?想看某个项目中使用的CI具体是哪个版本,怎么查看?
怎么查看CI的版本信息?想看某个项目中使用的CI具体是哪个版本,怎么查看?system\core\codeigniter.php中可以查看版本常量/** * CodeIgniter Version * ...
- python中,一个函数想使用另一个函数中的变量
问题: 第一个函数中用到了变量a:第二个函数也想使用变量a. 解决方法: 在第一个函数中将变量a定义为全局变量,然后在第二个函数中,也写上global a即可. 示例: def func1(): gl ...
- 要想在for语句中直接定义一个变量
要想在for语句中直接 定义一个变量 (如下的代码) 1 for(uint16_t i=0;i<10;i++); 2 if( GPIO_ReadInputDataBit(GPIOA, GPI ...
- VC++ Debug编译方式
字节填充 VC++在Debug编译方式下,new的内存用0xcd(助记词为Cleared Data)填充,防止未初始化: delete后,内存用0xdd(Dead Data)填充,防止再次被使用. 这 ...
- windows下VC界面 DIY系列1----写给想要写界面的C++程序猿的话
非常早就想写关于C++ UI开发的一系列博文,博客专栏刚审核通过,就立即開始刷博文,不能辜负自己的一番热血,我并非写界面的高手,仅仅想通过写博文提高我自己的技术积累,也顺便帮助大家解决界面开发的瓶颈. ...
- VC++ Debug产生异常时中断程序执行Break on Exception
It is possible to instruct the debugger to break when an exception occurs, before a handler is invok ...
- VC++ Debug内存值
Memory Values If you're using the debug heap, memory is initialized and cleared with special values. ...
随机推荐
- SQL数据库有阻塞就自动发邮件警报
1.建查询是否有阻塞的视图 create view [dbo].[VW_WaitingCount] as SELECT s.session_id, r.blocking_session_id, s.h ...
- 【Statistics】均值
均值 均值(mean)是全部数据的算术平均值,也称为算术平均.在统计学中具有重要的地位,是集中趋势的主要测量值.均值分为:简单均值.加权均值. 简单均值 设代表均值,代表样本各变量值,n代表变量个数, ...
- Drupal启动阶段之三:数据库
Drupal在数据库启动阶段仅仅是简单地包含了database.inc文件,然后再注册类加载器: function _drupal_bootstrap_database() { // Initiali ...
- (二)Solr——Solr界面介绍
1. Dashboard 仪表盘,显示了该Solr实例开始启动运行的时间.版本.系统资源.jvm等信息. 2. Logging Solr运行日志信息 3. Cloud Cloud即SolrCloud, ...
- c++对象模型介绍
http://www.cnblogs.com/skynet/p/3343726.html
- esriControlsMousePointer常量
控制鼠标指针选项. 不变 值 描述 esriPointerParentWindow -1 指针指定的父窗口或窗体. esriPointerDefault 0 默认指针,箭头一样. esriPointe ...
- Java并发编程(五):Java线程安全性中的对象发布和逸出
发布(Publish)和逸出(Escape)这两个概念倒是第一次听说,不过它在实际当中却十分常见,这和Java并发编程的线程安全性就很大的关系. 什么是发布?简单来说就是提供一个对象的引用给作用域之外 ...
- Unity中差乘判断目标是否在左边或右边
使用差乘判断左右一般是比较差乘的y,小于0是左,大于0是右.特殊情况可以用其他分量来比较 默认情况: var cross = Vector3.Cross(lhsObject.transform.pos ...
- Binary Tree Postorder Traversal --leetcode
原题链接:https://oj.leetcode.com/problems/binary-tree-postorder-traversal/ 题目大意:后序遍历二叉树 解题思路:后序遍历二叉树的步骤: ...
- socket failed:EACCES(Permission denied)
1. 权限问题 安卓端写的TCP协议软件报错原因是建立的套接字没有限权对外连接. 在AndroidManifest.xml中,加上这一句话,取得权限. <uses-permission andr ...