Delen via


Why autoexp.dat data visualizer entries are ignored at times

We had a customer who had issues with autoexp.dat. He added few data visualizers in autoexp.dat file but somehow none of them took effect in the debugger windows like Autos, Locals, etc. We initially thought the issue is with the way he gave format specifier in autoexp.dat file. After several corrections/trials nothing seemed to take effect.

(Just to give a brief description of autoexp.dat: Its a text file which tells visual studio debugger how to display a user defined type in debugger windows like Autos, Locals etc.)

In the end this turned out to be an issue with an option given in Tools->Options->Debugging->General. Please see highlighted item in the list. This option turns off all object structure view customizations if its turned on.

 

So in order to demonstrate the problem, I tested out CString display in the autos debugger window. This is how the display of autos window look when "Show raw structure of objects in variables window" is 'Off'. Note how the value of the CString variable 'Test' is displayed in the same line as the variable...

This is how the display of autos window look when "Show raw structure of objects in variables window" is 'On'. Please note display of CString variable 'Test', now the value is not displayed int the same line but visual studio displays the type in expanded form according to the member variables in CString type...

 

The above demo was a simple one becuase CString is not that complex a type (has few members). For complex types if  "Show raw structure of objects in variables window" is on you might end up expanding several nodes in order to see the real value, for e.g. map, vector etc. Have a look at how vector looks like when this option is 'off' and 'on'...

'Off'

 'On'

vector has a much better display in the autos window when this option is off.

Well then you may ask why do we need the "Show raw structure of objects in variables window" option? It has its own uses, the raw structure display is useful when you need to see how the object looks in memory, i.e. what addresses the internal vars were allocated at etc.

Yeah this option is kinda living in oblivion with very few aware of this option.

Comments

  • Anonymous
    March 12, 2012
    The comment has been removed

  • Anonymous
    March 16, 2012
    @FredK I don't know the answer as of now. I'll find out and get back to you.

  • Anonymous
    October 22, 2013
    Hi Thomas, do you know the answer to Fred's question now? I'm wondering if there is a separate autoexp.dat file or similar used for inteligent devices only. I'm having the same problem with STLPort on a Compact 7 target with VS2008. It works without problems on the host but changes to autoexp.dat do not take any effect when debuggin on the target.

  • Anonymous
    October 23, 2013
    Hi! I found the answer... There is a separate file for smart devices in: C:Program Files (x86)Microsoft Visual Studio 9.0SmartDevicesDebuggerbinsmartdevices_cpp.dat or C:Program Files (x86)Microsoft Visual Studio 8SmartDevicesDebuggerbinsmartdevices_cpp.dat