开发者

VS2010 RC - only 100 std::map elements in debugger

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开发者_如何学Go 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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜