# Thursday, September 21, 2006

How many Visual Studio Developers know about autoexp.dat? My guess is not many. This file, located in C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger for a typical install, controls how the debugger shows values in the Data Tips, locals window, auto window, etc. The file is yours, it's on your own computer, and you're free to edit it. Here's how to do so for a really simple (and redundant) type, Point:

class Point
{
private:
 int x, y;
public:
 Point (int xx, int yy)
 {x=xx; y=yy;}
 int getx()
 {return x;}
 int gety()
 {return y;}
};

I ran a really simple app that constructed a point, and paused in the debugger for a data tip:

Then I edited autoexp.dat, adding this line:

Point =(<x>,<y>)

I saved it and ran the debugger again, and now the tip looks like this:

You can do this for any class you write. It's your program, you might as well make your debugging life easier.

Oh, if you're wondering why my data tips are actually readable instead of in some tiny 3 point font, I blogged that earlier this summer.

Thursday, September 21, 2006 1:29:07 PM (Eastern Daylight Time, UTC-04:00)  #