Author Topic: Vector<string> cannot be displayed in Watches  (Read 2864 times)

Offline dwu

  • Single posting newcomer
  • *
  • Posts: 2
Vector<string> cannot be displayed in Watches
« on: September 08, 2011, 04:21:28 am »
I installed code:blocks 10.05 in Windows Xp.
I couldn't watch the vector<string> variable in debug mode, as shown here: http://dl.dropbox.com/u/11813850/ss.JPG
The code I use:
Code
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main()
{
    vector<string> a(2);
    a[0]="aaa";
    a[1]="bbb";
    return 0;
}

Could you please let me know what I should do in order to observe the variable?

Thanks in advance,

Di

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Vector<string> cannot be displayed in Watches
« Reply #1 on: September 09, 2011, 07:11:58 pm »
You need two things:
1. debugger branch nightly
2. python enabled gdb

Then search the forum for details how to use python enabled gdb.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]