CodeGuru
Earthweb Search
Forums Wireless Jars Gamelan Developer.com
CodeGuru Navigation
Member Sign In
User ID:
Password:
Remember Me:
Forgot Password?
Not a member?
Click here for more information and to register.

jobs.internet.com

internet.commerce
Partners & Affiliates
Promote Your Website
Corporate Gifts
Domain registration
Compare Prices
Memory Upgrades
Remote Online Backup
PDA Phones & Cases
Web Design
Televisions
Online Shopping
Online Education
Hurricane Shutters
Cell Phones
Calling Cards


RSS Feeds

RSSAll

RSSVC++/C++

RSS.NET/C#

RSSVB

See more EarthWeb Network feeds

Home >> Visual C++ / C++ >> Visual Studio >> Debugging

Project Management Guide: Developing a Web Site. Best Practices, Tips and Strategies. Download Exclusive eBook Now.

Tune the debugger using AutoExp.dat
Rating: none

Ramon de Klein (view profile)
February 21, 1999

Environment: VC6.0

Visual C++ v6.0 is shipped with a very good integrated debugger, but it has even more features then is documented in the online help files. I'll briefly describe some of these features, so you can use them to make your own programming a little more efficient. Some of these tips were mentioned during the European Visual C++ Developer's Conference in January 1999 in Amsterdam (WARNING: the NoStepInto is an undocumented feature, this means: no support, may change, may not work...!). The AutoExp.dat file (in the \Program Files\Microsoft Visual Studio\Common\MSDev98\Bin directory) has some very neat features that can help you tune the debugger. This file is read when the debugger is started and looks just like an INI-file. Both the Automatic expansion of structures and avoid stepping into particular functions are configured using this file.

Automatic expansion of structures


(continued)



 Silverlight 2 SDK for Visual Studio 2008
This package is an add-on to the RTM release of Visual Studio 2008 to provide tooling for Microsoft Silverlight 2 Beta 1. It provides a Silverlight project system for developing Silverlight applications using C# or Visual Basic. »
 
 Article: What Does it Take to Build the Best RIA?
With the proliferation of Rich Interactive Application (RIA) platform choices out there, you no longer have to take a one-size-fits-all approach to developing your next RIA application. Knowing the strengths (and weaknesses) of each platform can help you to decide the best RIA for your next application. »
 
 Expression Blend 2.5 Preview
Use Expression Blend 2.5 to create and modify managed Silverlight 2-based applications. Expression Blend for Silverlight 2 includes all of the features in Expression Blend 2 but has not reached the quality level of Expression Blend 2 for WPF or Silverlight 1 development. »
 
 The Hottest Mobile Platform Meets the Hottest RIA Platform
With the Symbian OS now supporting Microsoft Silverlight, mobile developers can bring new and exciting capabilities to handsets all over the globe. Find out why developers now need to make mobile devices a core part of their RIA development strategy. »
 
 Article: Leveraging Your Flash Development with Silverlight
You're not giving up Flash any time soon (and we don't blame you.) But if you could get your Flash application working in Silverlight, why wouldn't you? We show you the tools and techniques required to have your rockin' Flash application rolled for Silverlight. »
 

The debugger is capable of displaying the contents of a structure (or class) in a watch or a tooltip. For some structures, you can actually see what's inside the structure (i.e. the CString class). For your own structures you only see three dots and that's it. Of course you can expand these watches in the debugger, but for tooltips you're out of luck. Fortunately, this mechanism of displaying the contents of a structure wasn't hardcoded in the debugger, but it's done using a special section in the AutoExp.dat file. Open the file and look for the [AutoExpand] section and you'll see how this is accomplished. The following piece of text is extracted from this file, but is included here for reference.

AutoExpand rules use the following syntax. The equals sign (=), angle brackets (<>), and comma are taken literally. Square brackets ([]) indicate optional items.

type=[text]<member[,format]>...
Type Name of the type (may be followed by <*> for template types such as the ATL types listed below).
Text Any text.Usually the name of the member to display, or a shorthand name for the member.
Member Name of a member to display.
Format Watch format specifier. One of the following:
Letter Description Sample Display
d,i Signed decimal integer 0xF000F065,d -268373915
u Unsigned decimal integer 0x0065,u 101
o Unsigned octal integer 0xF065,o 0170145
x,X Hexadecimal integer 61541,X 0X0000F065
l,h long or short prefix for d, i, u, o, x, X 00406042,hx 0x0c22
f Signed floating-point 3./2.,f 1.500000
e Signed scientific-notation 3./2.,e 1.500000e+000
g Shorter of e and f 3./2.,g 1.5
c Single character 0x0065,c 'e'
s Zero-terminated string 0x0012fde8,s "Hello world"
su Unicode string 0x007200c4,su "Hello world"
st String in ANSI or Unicode depending on current setting

The special format <,t> specifies the name of the most-derived type of the object. This is especially useful with pointers or references to a base class. If there is no rule for a class, the base classes are checked for a matching rule.

Avoid stepping into particular functions

Did you also debug some code, where you had to step into some functions but you're stepping more in CString's internal functions then in the code which you wanted to debug? There is an (undocumented) solution to this problem and it's in the AutoExp.dat file as well. Create a section called [ExecutionControl] and add the following line for functions that should be treated as "atomic":

Function=NoStepInto Avoid stepping into this specific function
Classname::Method=NoStepInto Avoid stepping into the specific method of this class
Classname::*=NoStepInto Avoid stepping into any of the methods of this class

The CString class is used throughout the code, so you're normally not interested in the construction, destruction and assignments of this class. Add the following code to the AutoExp.dat file to prevent stepping into these functions:


[ExecutionControl]
    CString::CString=NoStepInto
    CString::~CString=NoStepInto
    CString::operator==NoStepInto

Tools:
Add www.codeguru.com to your favorites
Add www.codeguru.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

Generate Complete .NET Web Apps in Minutes . Download Iron Speed Designer today.
Intel Go Parallel Portal: Translating Multicore Power into Application Performance
Flash Demo: Learn how IBM Information Server Blade is easy to manage, highly scalable and efficient.
Guide to Developing a Web Site. Best Practices, Tips and Strategies. Download Exclusive eBook Now.
Data Sheet: IBM Information Server Blade


RATE THIS ARTICLE:   Excellent  Very Good  Average  Below Average  Poor  

(You must be signed in to rank an article. Not a member? Click here to register)

Latest Comments:
How about VC .NET? - Legacy CodeGuru (12/03/2003)
Any luck with nested namespaces? - Legacy CodeGuru (08/24/2003)
CodeWarrior ? - Legacy CodeGuru (03/20/2003)
New line in debug ? - Legacy CodeGuru (01/15/2003)
Couple more formatting chars - Legacy CodeGuru (07/25/2002)

View All Comments
Add a Comment:
Title:
Comment:
Pre-Formatted: Check this if you want the text to display with the formatting as typed (good for source code)



(You must be signed in to comment on an article. Not a member? Click here to register)


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES