See what's going on with flipcode!




This section of the archives stores flipcode's complete Developer Toolbox collection, featuring a variety of mini-articles and source code contributions from our readers.

 

  More MSVC Tricks
  Submitted by



Visual C++ 6, have many "hidden" but usefull features, user defined syntax coloring via usertype.dat have been already discussed in TOTD, another one no less important is file autoexp.dat located in Visual Studio\Common\MsDev98\Bin. Conents of this file guide msvc debugger to display user specified types. Its very annoying when using variable watch while debugging to expand user classes, especially small, often used ones, (like string or vector), and sometimes, such classes can contain many static members, and when expended can waste half of watch screen space. This is where autoexp.dat really comes handy, full format description of autoexp.dat is written at the begining of the file itself. i`ll just give simple example: suppose you have a string class.

class String
{
public:
   ...
private:
  char *m_str;
}; 



to force MSVC to show contents of m_str member when displaing instance of String class (instead of just pointer to String) we add to autoexp.dat next line: String =<m_str,st> restart MSVC and run debugger, now when you add to watch instance of String class, it will nicely show string itself in same line. same, can be done for vector,quaternion and other primitive classes.

Enjoy your debugging :) Timur Davidenko
3Dion Inc.

The zip file viewer built into the Developer Toolbox made use of the zlib library, as well as the zlibdll source additions.

 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.