Breakpoint only breaks once

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Contact:

Breakpoint only breaks once

Post by dglass » Wed Jul 06, 2011 7:08 pm

It appears that a breakpoint is only triggered once per 'run' or debugging session, is this correct? If it is correct, is it really the intended behavior?

I put a breakpoint in a handler that is called more than once. On the first visit to the handler, the breakpoint is reached, and I am kicked to the debugger (I am using PowerDebug, but I don't think that matters). If I then click 'Run', execution continues, but all subsequent calls to the handler with the breakpoint do not break at the breakpoint.

Is there a way to make the execution stop at the breakpoint on the second, third, etc., visits?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Breakpoint only breaks once

Post by mwieder » Wed Jul 06, 2011 9:10 pm

I am using PowerDebug, but I don't think that matters
It *should* matter <g>

I haven't seen this behavior. Are you entering a "breakpoint" command into the script editor or is this a soft breakpoint (by clicking to the left of the text in the script editor? And are you using the built-in script editor or a third-party editor? And do you have any breakpoint trigger expressions defined?

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Contact:

Re: Breakpoint only breaks once

Post by dglass » Wed Jul 06, 2011 9:31 pm

I'm using the 'click the margin' method to set the breakpoint. I can try the breakpoint command, although I would have expected them to be equivalent.

Built in script editor.

Don't know what 'breakpoint trigger expressions' means, so hopefully I don't have any defined. :)

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Breakpoint only breaks once

Post by mwieder » Wed Jul 06, 2011 10:21 pm

I can try the breakpoint command, although I would have expected them to be equivalent.
They're not. The script editor inserts a "soft" breakpoint which is rather temporary. We stayed away from these in glx2 because there are other problems associated with breakpoints tied to a particular line number while you're editing text. The soft breakpoints are stored as a custom property list in the editor. While you're in PowerDebug you can also click to the left of a line of code and instantiate a soft breakpoint there that will persist through your debugging session.

I can see I've got a bug to fix. I'll need to revisit how I'm picking up the soft breakpoints from the editor.

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Contact:

Re: Breakpoint only breaks once

Post by dglass » Wed Jul 06, 2011 11:11 pm

mwieder wrote:We stayed away from these in glx2 because there are other problems associated with breakpoints tied to a particular line number while you're editing text.
I was using glx2 for a while, but the IDE is so unstable for me I disabled it to try to narrow down the cause, and haven't put it back yet (mostly because the IDE is *still* really unstable for me).

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Contact:

Re: Breakpoint only breaks once

Post by dglass » Wed Jul 06, 2011 11:15 pm

Oh, and the breakpoint command did the job.

Looks like I'll be using that from now on since it is more reliable.

Thanks!

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Breakpoint only breaks once

Post by mwieder » Wed Jul 06, 2011 11:47 pm

Well, I still need to fix that up, so I'll get to that and issue a PowerDebug update when I've got it.

Post Reply