-2

I am currently run a C++ project on VS 2013 update 4 on Windows 8.1. However, when I was debugging, the value of my vector did not show on the debugger window. Instead, it shows me a "{...}". Usually, debugger shows me the value in the vector. But the other variable's value is fine, such as int type of something.

Any help would be appreciated.

Below are the code and the debugger snapshot.

Code

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{

    vector<int> test{ 1, 2, 3 };

    test.push_back(3);


    system("pause");
    return 0;
}

Debugger:

debug

Expanded Debugger: enter image description here

Updated 2016/09/10

I tried to reset all settings and it works. However, I still don't know the reason of such problems.

kluo
  • 131
  • 1
  • 10

2 Answers2

2

I suspect you are not using the "step-over" when debugging. I think once the program reaches the breakpoint you simply continue (F5). Put the breakpoint and once the program enters the debugger use the "step-over" (F10) to step through the remainder of your code.

Debugger screenshot

  • Thanks for the reply. But I didn't have the chance to do that since I reset all the settings. – kluo Sep 10 '16 at 14:02
0

The problem is that your MSVC Debug Visualizers for STL are bugged or not loaded.

Try running Native Only or this solution https://stackoverflow.com/a/20834982/4990069

Community
  • 1
  • 1
Dimitar Mirchev
  • 992
  • 1
  • 8
  • 17