Visual Studio's debugger doesn't display more than 99 elements of a C++ container
I am trying to inspect all elements of a std::set container in my C++ a开发者_StackOverflow中文版pp, but visual studio 2005/2010 only displays the first 99 elements. How do I configure the IDE to show all elements?
Thanks..
FWIW, you get this ability out-of-the-box with VS2008 but it seems to have gone away in VS2010. I just tried this in both VS2008 and VS2010:
std::set< int > s;
for(int i = 0; i < 400; ++i)
{
s.insert(i);
}
Setting a breakpoint afterwards and then using the Locals or Watch panels, if I expand s the debugger shows me all 400 elements below it in VS2008 but only the first 100 in VS2010.
I don't remember configuring anything in VS2008 to make this happen.
FWIW, with C-style arrays and general pointers, you can tell the debugger how many elements to show. p,200 would show the 200 elements from *p onwards. That doesn't seem to work with std::set objects, though. :(
I see exactly the same thing at home on VC++ Express 2010. My guess is that to get around this you would have to use one of the paid-for versions of the IDE. How irritating.
精彩评论