User forums > General (but related to Code::Blocks)
Watch for a variable to change to a specific value
(1/1)
Poobah:
I'm not sure if this is possible or not, but could a feature be implemented in the debugger where one can choose to watch a variable and break when it changes to a specific value? This would be extremely useful for me.
mandrav:
Currently there are two ways to break based on data:
[*] Breakpoint counter: when you put a breakpoint, you can change its properties and add a counter so that it actually breaks after "x" times it is hit or put a conditional expression like "i>10".
[*] Data breakpoint: this has no conditions or counter (i.e. not implemented yet) but still are useful to break when a memory location is either read, written or for both cases.
Poobah:
Thanks, mandrav. I hadn't noticed that breakpoints' properties could be edited.
Navigation
[0] Message Index
Go to full version