充分挖掘你的VC++ Debugger的潜能(一)[4]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 zhengyun_ustc 的 blog

where?

首先要知道,只有vc++ debugger才能做到这一点。

其次,打开你的vstdio工作路径:
c:\program files\microsoft visual studio\common\msdev98\bin

找到autoexp.dat文件,用文本编辑器打开:

autoexp.dat - templates for automaticially expanding data

 

vc++ debugger就是通过这个文件里的[autoexpand]下的定义,来自动扩展常见的数据类型,显示它们重要元素的内容的。

 

how to?

std::basic_string<*>=<_ptr>

这么一定义,vc++ debugger就知道显示_ptr的内容了。

我有一个类cmyclass,它是这么定义的:

class cmyclass

{

   

string _strvalue;

int   _nrefcount;

};

那么,我就可以在最后添加这么一句话:

; new for zhengyun’s custom data type:

cmyclass = <_strvalue,su> (引用计数: <_refcount,u>)

或者

cmyclass = <_strvalue,st> (引用计数: <_refcount,u>)

本文关键:vc debugger watch AUTOEXP.DAT
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top