Transitory stepping bug

OK, I’ve seen this before, but have trouble recreating. What happens is sometimes I’ll be debugging a script and on a handler call I’ll click the step-over button. It will execute the handler, but then keep going as if I hit play.

This morning it started happening so I made a movie of it.

I copied and pasted the script into another window and tried it there and it worked correctly. (You’ll see that in the movie).

After the movie I saved the script, leaving the window open, and tried again, same buggy behavior. Then I closed the window and reopened the script and it worked correctly.

Could not get it to start doing it again. But I can say I’ve seen this before from time to time, and figured I’d hit play instead of step over. But, no, this is a bug, but a hard one to reproduce.

If it happens again is there anything I can do while it’s happening that will help you figure it out?

Quick update. I went back to the saved and reopened script and it tooled around with it and it started happening again. Apparently on this script if you turn off break points, and there are breakpoints in the handler that become deactive but no breakpoints in the run handler, the behavior happens. (Not too clear on how much of all of that is required, but that’s the set up where it starts happening).
I saved and compressed the script:

I have been able to recreate it at work, with some effort. It seems to be a combination of debugging on (of course) and breakpoints on/or off, with breakpoints active or deactivate in both the run handler and the hander stepped over. I’m trying to do it with as simple a script as possible, but it’s elusive. But once it starts in a script it’s fairly easy to reproduce.

–> Script Debugger 7.0.2 (7A51)
–> Mac OS 10.11.6 (15G20015)

This is a fascinating bug. I’m not yet able to reproduce it here with the example script you provided. Clearly, from the video, its happening and your suspicion that the presence of inactive breakpoints might be part of the cause sounds possible. I’m just not yet able to create the behaviour your are seeing here.

I wonder if the code path through the EstablishAFolder handler differs from the norm in some when SD fails. Perhaps the combination of an exception with the disabled breakpoints.