Weird glitch in breakpoint behavior
tedennis at softwaredetails.com
Thu May 23 23:34:09 CDT 2013
I was testing a 6.0.1 stack when "Step into next statement" after a manual breakpoint acted like a 'Continue" ... meaning it didn't stop until the end of the script. I was able to recreate the problem repeatedly, so I began to whittle down my script to find what caused the glitch. In so doing, I checked various preference settings to see what might have caused the weird glitch.
I kept whittling away until there wasn't much left in my script, so I finally decided to start from scratch with an entirely new app. It happened again with a do-nothing script.
1) Put the following simple script into a button's mouseUp script in a new app.
2) Set breakpoints manually on lines 2 and 4.
3) Click the button. It stops on line 2, as expected.
4) Click on Edit/Preferences in the LiveCode menu
5) The app runs to the hardcoded breakpoint on line 6
First of all, it shouldn't have run when I merely opened the preferences dialog.
Secondly, it missed the manual breakpoint on line 4
OK, so like a good little developer, I tried the same script in a backleveled version (5.5.1) to see if recent LiveCode updates created the problem. That's the most likely scenario, right?
Nope. I got the same results. Apparently this weird glitch has been around since today's pebbles were large boulders.
Lots of testing later ...
There were *some* instances of opening the preferences dialog that didn't cause the problem. And, selecting individual preference items didn't cause the problem.
However, EVERY time I selected the "Updates" preference item, the script "Continue"d.
Yeah, I know. The doctors says if it hurts, then don't do that. OK, so I won't open the Preferences dialog and test for "Updates" during debugging sessions.
This weird glitch *might* be related in some bizarre manner to prior (seemingly) random and unrecreatable weird glitches I have had with breakpoint executions. The good news (I think) is this time I was able to recreate and isolate the weird glitch.
Well, I isolated *a* weird glitch. Whether it is related to my *original* weird glitch, I don't know.
The original weird glitch with my app would sometimes (randomly?) get triggered by simply clicking on the "up arrow" in the Variables display of the IDE. Is a keystroke being passed through the hierarchy into the app when it shouldn't be? Unknown. The (random?) up arrow weird glitch happened only in 6.0.1, so it's possible that particular weird glitch occurred because of recent updates to LiveCode.
In addition to the above weirdness, the same preferences weird glitch is recreatable in 6.0.1 by clicking on Tools/Project Browser. Am I more likely to open the Project Browser during debugging than I am likely to open the Preferences dialog? Ubetcha.
Again, is this preferences/browser dialog weird glitch related to my original weird glitch? Heck if I know. It's just plain weird.
Hopefully this exercise will help others who have experienced (seemingly) random weird glitches with breakpoints in the past. It's possible all those weird glitches could have a common thread, so fixing this *recreatable* weird glitch could solve all those other weird glitches at the same time.
I suppose I could be the ONLY poor soul who has experienced weird glitches with breakpoints, but I doubt it.
Did I mention it was a weird glitch?
put empty into tGarbage1 -- once
put empty into tGarbage2 -- twice
put empty into tGarbage3 -- three times
put empty into tGarbage4 -- a lady
More information about the use-livecode