Author Topic: Watch for a variable to change to a specific value  (Read 4154 times)

Poobah

  • Guest
Watch for a variable to change to a specific value
« on: April 25, 2007, 02:58:34 am »
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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Watch for a variable to change to a specific value
« Reply #1 on: April 25, 2007, 08:58:38 am »
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.

Be patient!
This bug will be fixed soon...

Poobah

  • Guest
Re: Watch for a variable to change to a specific value
« Reply #2 on: April 26, 2007, 08:37:28 am »
Thanks, mandrav. I hadn't noticed that breakpoints' properties could be edited.