User forums > Help
can coldblocks break program automaticly in debug when variable is changed
(1/1)
fei123:
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 .
ollydbg:
--- Quote from: 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” .
--- End quote ---
Have you see the "command input control" at the bottom of the debug panel. You can enter (do) anything as you did in GDB.
mandrav:
Memory may be failing me but isn't there a "Debug->Debugging windows->Watches" window for this kind of thing?
oBFusCATed:
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.
fei123:
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
Navigation
[0] Message Index
Go to full version