Page 1 of 1

Breakpoint only breaks once

Posted: Wed Jul 06, 2011 7:08 pm
by dglass
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?

Re: Breakpoint only breaks once

Posted: Wed Jul 06, 2011 9:10 pm
by mwieder
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?

Re: Breakpoint only breaks once

Posted: Wed Jul 06, 2011 9:31 pm
by dglass
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. :)

Re: Breakpoint only breaks once

Posted: Wed Jul 06, 2011 10:21 pm
by mwieder
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.

Re: Breakpoint only breaks once

Posted: Wed Jul 06, 2011 11:11 pm
by dglass
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).

Re: Breakpoint only breaks once

Posted: Wed Jul 06, 2011 11:15 pm
by dglass
Oh, and the breakpoint command did the job.

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

Thanks!

Re: Breakpoint only breaks once

Posted: Wed Jul 06, 2011 11:47 pm
by mwieder
Well, I still need to fix that up, so I'll get to that and issue a PowerDebug update when I've got it.