User forums > Using Code::Blocks
Using the debugger - watch 'variable'
noobiept:
Hi, I'm trying to use the debugger to find a mistake on my program, and I'm trying to make the program stop at some position and to look up the values of some variables.
I check this entry, http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks but I stopped at the part where you are supposed to select a variable, right click and then click "Watch 'variable name'". I just can't see this option there. I don't know if that option is somewhere else, but I just can't find it.
thanks in advance
oBFusCATed:
What about your OS, CB version?
Also you should right click over your variable, if you click at an empty space it won't work, also it won't work if you right click at "obj->member".
Another way to do this is right click in the watches window and then "Add watch" or something like that.
noobiept:
Windows 7 / CB 10.05
Yes, I'm right clicking over the variable.
I tried the add watch but it doesn't show anything on the watches window.
oBFusCATed:
Can you provide the debuggers debug log?
Settings -> Compiler and debugger -> Debugger -> Enable debuggers debug log (or something like that)
noobiept:
I checked: 'Display debugger's log' , but then don't know where it is saved.
I read again the wiki entry and find out that you can only add after you start the debug(I'm really inexperient in this).
I didn't understand this the first time I read it. Either way, after I run the debugger, I can do the: Watch 'variable'.
Then when I write something on the program to make it running it terminates normally and in the watches window it says:
tmp1 = No symbol table is loaded. Use the "file" command.
tmp1 is a variable in the program.
It seems this problem its more of a lack of experience on my part. I don't really know how to use the debugger... :(
Navigation
[0] Message Index
[#] Next page
Go to full version