Question

I have a small problem during debugging my App in VS 2010 RC when I want to see all the elements of std::map container.

When debugger reaches the breakpoint and I want to check the values of the map in element inspector (in 'Locals' windows and in pop-up windows after hovering the variable name with mouse as well) and I'm scrolling down the list of the elements it stops on the 100 element and I can't next elements. The map contains more than 200 elements (map's counter parameter shows this properly) but I can't view them all in the element inspector.

The problem appears even in the most simple std::map<int, int> filled with 200 int values.

Maybe this is a problem with settings, but I've tried many combinations of them and it still does not work. Maybe somebody have some ideas how to solve this.

Thank you in advance for your help.

Was it helpful?

Solution

The display of such information is directed by the autoexp.dat file (usually located in "Program Files*"\"Microsoft Visual Studio*"\Common7\Packages\Debugger). It seems that Microsoft added a hard coded limitation of 100 elements to the #tree operator, in order to avoid freezing Visual Studio in case of loops in the tree.

OTHER TIPS

With VS 2010 SP1 this limit was increased to a default value of 2000 entries. This can also be modified by setting a registry key (all the standard warnings about modifying the registry apply here):

  • for x86: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\NativeDE\VisualizerMaxChildren
  • for x64: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\NativeDE\VisualizerMaxChildren

Scot Brennecke, Escalation Engineer Microsoft VC++ Support

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top