Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015: Visualization of std::vector doesn't show information in debug

I installed a new update of visual studio 2015 and have now the version 14.0.25424.00 with update 3. After installing the update the visualization of std::vectors while debugging changed. Usually when I debugged a program I could see the size and the items of a std::vector.

After the update I only can see the raw view of the std::vector.

Visualization of a vector in the 'Locals' window

Here is the code which I used to for this example:

int main()
{
   int a = 1;
   std::vector<int> vecOfInt;
   vecOfInt.push_back(1);
   vecOfInt.push_back(2);
   vecOfInt.push_back(3);

   return 0;
}

I think that maybe during the update some settings in visual studio changed but I can't find out what is different... Does anyone has an idea what I could try to fix this besides reinstalling visual studio?

EDIT: Here the requested debug settings: enter image description here

like image 445
e_card Avatar asked Jul 29 '16 10:07

e_card


2 Answers

Had the same problem. Repairing the update fixed it.

Go to Control Panel\All Control Panel Items\Programs and Features -> View Installed Updates -> Right click on Visual Studio Update 3 -> Change -> Repair

like image 77
WinterMute Avatar answered Oct 20 '22 12:10

WinterMute


I debug it in my two VS2015 machines Enterprise and community 14.0.25424.00 version.

I found that the option "Use Native Compatibility Mode" will impact the std::vector size in the local or Watch window. If I disable it, it works well in my side.

Maybe you could reset your VS settings and debug it again.

TOOLS->Import and Export Settings Wizard->Reset all settings->select “No, just reset settings, overwriting my current settings”->Choose a Default Collection of settings.

enter image description here

like image 1
Jack Zhai-MSFT Avatar answered Oct 20 '22 12:10

Jack Zhai-MSFT