Code::Blocks Forums
User forums => Help => Topic started by: fei123 on July 05, 2010, 08:53:12 am
-
using gdb ,we can break program when variable is changed .
we just use the cmd “watch a” .
a =0 firstly,then when a is changed into 1,the program will be break running automaticly.
how can i do this in codeblocks??
codeblocks can watch the change of variable .the colour will be changed when the variable is changed . but the programme will not be break automaticly !!
thank u for your help .
-
using gdb ,we can break program when variable is changed .
we just use the cmd “watch a” .
Have you see the "command input control" at the bottom of the debug panel. You can enter (do) anything as you did in GDB.
-
Memory may be failing me but isn't there a "Debug->Debugging windows->Watches" window for this kind of thing?
-
There is something called Data breakpoints.
I think, that in order to use them you need to stop on a breakpoint first.
Then right click your variable in the editor and "Add data breakpoint for 'myvar'" or something like that.
-
Have you see the "command input control" at the bottom of the debug panel. You can enter (do) anything as you did in GDB.
[/quote]
yes。it is right。
in my example just input “watch a ” in the debug---send user command to debug ,and select view--Logs .
i can see the informations like "info breakpoint " in gdb