User forums > Using Code::Blocks
std::vector in the debugger: i don't understand the previous topic
21did21:
Hello world,
i am new in programmation (and in code::block); when i debugg, i want to see the contents of the vectors.
I have seen that in this forum there is already one subject ( http://forums.codeblocks.org/index.php/topic,10667.msg73032.html#msg73032 )
but i don't understand it, because:
- my english is poor and in this subject the number of developpement are very long and i don't understand that is important.
Can you resume please for me the different step to can see the content of vector<double> , vector<int>, vector<string> ...
thanks a lot!
ps: in debugg mode, I do not know how to look at the contents of variables: i clikck right on variable and i do :
watch"myVariable"
and in the debugg windows i obtain this: MyVariable=No symbol "myVariable" in current context
ollydbg:
I suggest you can use a python supported gdb.
If you use windows, see:
http://code.google.com/p/qp-gcc/wiki/GDB
21did21:
--- Quote from: ollydbg on May 03, 2011, 10:49:33 am ---I suggest you can use a python supported gdb.
If you use windows, see:
http://code.google.com/p/qp-gcc/wiki/GDB
--- End quote ---
thank a lot for your help!
i have download the package and i have configurated this step:"Load the python script when Debugger started in Codeblocks" of your page
but after this i always can't see the content of my variables and my vector, other step are necessary?
==> (my english is bad end i am a little beginniner in programmation, this is the reason that it don't understand all)
EDIT:
-for a very simple it's work for double end int type, but it don't work for vector?
-for values close to 0 the debugg show 0 end not 1e-20 !!! it's normal ?
21did21:
it's work now!!! thank you a lot !!!
just one think:
==> we can't see the content of: vector <vector <double>> ?
oBFusCATed:
if you use the python pretty printing you can.
To disable the C::B pretty printing you should comment the code inside RegisterTypes in the file gdb_types.script.
Navigation
[0] Message Index
[#] Next page
Go to full version