I'm running Visual Studio Enterprise 2015, version 14.0.23107.0 D14REL.
When debugging a C++ program I cannot see the contents of STL containers.
I've got the "Show raw structure of objects in variables windows" option unchecked (Tools->Options->Debugging->General).
Here's an example that illustrates the problem:
#include <list>
#include <string>
#include <vector>
int main()
{
std::string string = "test";
std::vector<int> vector{ 4, 5, 6 };
std::list<std::string> list{ "one", "two", "three" };
return 0;
}
In the Locals or Watch windows I see the following:
list [...]()
vector [...](...
(error) 0
(error) 0
string {npos=4294967295}
(error) 0
(error) 0
If I then check the "Show raw structure..." option, I can correctly drill down into the vector and string objects, but still not the list!
Is there another option that I've missed, or is this a genuine bug in VS?
See Question&Answers more detail:os