Page 1 of 1

Inconsistency in messages between script with debug breakpoint and without

Posted: Wed Nov 03, 2021 3:53 am
by rodneyt
This is a weird one.

I have a script which when executed is producing a strange behaviour which I think is related to (I won't get into what it does for now). The interesting thing, is if I set a breakpoint in the script, it executes normally. The problem only happens when debugger is not being used. Lock messages doesn't seem to be having any effect either way.

Has anyone else run into situations where messages appearing in message path (e.g. message watcher) change as a result of debug checkpoint being set?

~ Rodney

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Wed Nov 03, 2021 6:14 pm
by dunbarx
I have seen this, where setting a breakpoint allows a handler to work fine up to the stop, and then when I allow the process to continue, works fine to the end. But removing that breakpoint throws an error.

These all eventually resolved themselves, though I do not have a recipe. I sort of remember moving lines around, adding blank lines, whimpering, that sort of nonsense, and all of a sudden the issue went away. It seems to have something to do with the construction of the handler itself, sort of like when red dots could not remember what line they were placed in when edits were made to the overall text.

Craig

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 04, 2021 1:35 am
by rodneyt
Has anyone else run into a situation where breakpoints refuse to drop Llivecode into debugger - e.g. you've set breakpoint in code, but code executes without dropping into the debugger?

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 04, 2021 1:49 am
by stam
rodneyt wrote:
Thu Nov 04, 2021 1:35 am
Has anyone else run into a situation where breakpoints refuse to drop Llivecode into debugger - e.g. you've set breakpoint in code, but code executes without dropping into the debugger?
Yep - breakpoints don't work for me when trying to debug certain situations like populating data grids (fillInData handler etc) or running actions from controls in data grids (such as a popup menu)...

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 04, 2021 2:47 pm
by dunbarx
I have seen red dot breakpoints not trigger, the flow of execution just running right past them, but not in several years. I am not sure if this was due to the ole unstable red dot issue or not.

These were always red dots, never explicit "breakpoint" commands.

Craig

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 04, 2021 6:42 pm
by stam
dunbarx wrote:
Thu Nov 04, 2021 2:47 pm
I have seen red dot breakpoints not trigger, the flow of execution just running right past them, but not in several years. I am not sure if this was due to the ole unstable red dot issue or not.

These were always red dots, never explicit "breakpoint" commands.

Craig
The issue i mention above happens with the 'breakpoint' command as well - code execution just doesn't halt...

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Fri Nov 05, 2021 12:19 am
by dunbarx
I could be wrong about the red-dot-only thing. Cannot be certain if it happened with the breakpoint command as well.

Craig

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Fri Nov 05, 2021 6:29 pm
by jacque
I think these errors happen when the script has branched into IDE specific libraries, which apparently don't break if gRevDevelopment is false. That's my guess anyway. I usually move the breakpoint to the line above or below.

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 11, 2021 12:39 am
by rodneyt
The situation I am in is that I cannot get this project to drop into the debugger at all, Whether I set red dot or put "breakpoint". For some reason the debugger has stopped working/invoking entirely. Stumped.

E.g. make a button

on mouseUp
breakpoint
answer "yes"
end mouseUP

Won't go into debugger....

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 11, 2021 1:11 am
by stam
rodneyt wrote:
Thu Nov 11, 2021 12:39 am
Won't go into debugger....
That's definitely weird - i can't reproduce that.
Out of curiosity what version of LC are you running?

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 11, 2021 1:12 am
by jacque
That sounds like debug mode got turned off. Check the menu item.

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 11, 2021 3:32 am
by rodneyt
Thanks Jacque, after posting this I did have a vague feeling I'd run into this before. It was indeed debug mode switched off - it's a feature I never intentionally use.

Still having the other issue with script behaving differently when executed vs debugged, but Im sure I will figure that out eventually...

~ Rodney

Re: Inconsistency in messages between script with debug breakpoint and without

Posted: Thu Nov 11, 2021 5:21 am
by jacque
It's happened before where debug mode accidentally gets turned off, I suspect it's a mis-hit on another menu item.

If setting the breakpoint on a different line doesn't work maybe you can post a few lines above and below the problem area and we might see what's wrong. I know I've had scripts that will run to completion without breaking, and often it has something to do with TSNet or libURL running a command and ignoring my script. When the library finally lets go, LC runs the remaining lines at breakneck speed and doesn't stop.