[Bug] Red Dot Breakpoints Ignored - Recipe

Mark Wieder mwieder at ahsoftware.net
Sun Aug 30 00:41:09 CEST 2015

On 08/29/2015 03:53 AM, Kay C Lan wrote:

> I expected to find a Bug Report at the QCC but nothing stuck out. I know
> that this has been a long standing issue so can:
> a) you confirm that you see this too
> b) suggest an appropriate bug number to add my findings.

That said, the way LiveCode deals with breakpoint conditions is pretty 
screwy. If you apply a condition to a breakpoint, it it stored in a 
custom property of the stack. When a breakpoint occurs, the conditions 
are checked. But they're global to the stack.

Try this:

on mouseUp
   put 1 into x
   repeat with y = 1 to 10
     add 1 to x
   end repeat
end mouseUp

on grunt
   put 1 into x
   repeat with y = 1 to 10
     add 1 to x
   end repeat
end grunt

Now set breakpoints on both add lines, and add a condition to only the 
second line:

x > 3

Click the button and the breakpoint fires only when the condition is 
met, even though you set it for a different line.

It's not so much a bug as a systemic failure, because in order to change 
the behavior the script editor and debugger would have to change what 
they do in some seriously wide-sweeping ways. The oddest part to me is 
that there's already a mechanism in the engine for dealing with this, 
but the IDE doesn't use it.

  Mark Wieder
  ahsoftware at gmail.com

More information about the use-livecode mailing list