When I try viewing a std::list in the Visual Studio debugger, I basically just want to see an array of all the myList.size values that list contains. In an ideal world, I could just do that by typing "MyList, x" for some x < myList.size into the Watch Window.
However, that does nothing. Instead, I must expand a ridiculous amount of variables by hand to see each value, one by one:
myList -> std::_List_val -> std::_List_nod -> _Myhead -> _Myval
And that's just for the first value in the list.
This is an awful way of debug-viewing the values in my list. Is there any way I can just see all the values in the list without worrying about the implementation details?
This question also applies to other STD containers, such as vectors. I just want to do "MyStdContainer, x" and not care about how I'm containing my variables.
Thanks!
std::listas if it was an array in VS debugger windows by default, in any moderately recent version of VS (I think since 2005 on?) - e.g. see technet.microsoft.com/en-us/query/aa718539. Are you using a third-party implementation of STL, by chance (e.g. STLPort)? - Pavel Minaev