Red dot breakpoints do not stick in v9
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Red dot breakpoints do not stick in v9
Richard.
It doesn't always happen.
I just made a small test stack and tried it. The red dot sticks no matter what I do. I then went to a large script in an existing project with lots of stuff in it. The red dot is always ignored if I add or subtract lines above the dot.
It cannot be that the length of the script matters? Have you really never seen this? You always use the "breakpoint" command?
Craig
It doesn't always happen.
I just made a small test stack and tried it. The red dot sticks no matter what I do. I then went to a large script in an existing project with lots of stuff in it. The red dot is always ignored if I add or subtract lines above the dot.
It cannot be that the length of the script matters? Have you really never seen this? You always use the "breakpoint" command?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Red dot breakpoints do not stick in v9
It might. Once we have a way to reproduce it we can find out.
I have neither the time nor any reason to mislead you on that.Have you really never seen this?
No, I just write perfect code.You always use the "breakpoint" command?
Truth I just don't like LC's debugger. Too cumbersome. I use it when I need it, but I rarely need it. I can usually figure out what I need from a well-placed answer dialog faster than stepping through line by line. Or sometimes I use my Flight Recorder. And once in a great while I use my own debugger, which is leaner but given how rarely I use debuggers at all it's usually not worth the trouble to bring into the session.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 854
- Joined: Wed Nov 04, 2009 11:41 am
- Location: Gunthorpe, North Lincs, UK
Re: Red dot breakpoints do not stick in v9
This sounds much like it might be related to this bug report https://quality.livecode.com/show_bug.cgi?id=19173 that I submitted the other year. The report was about saved breakpoints not working but the worry was that it seemed that my instance of Livecode was the problem.
Simon
Simon
best wishes
Skids
Skids
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Red dot breakpoints do not stick in v9
Richard.
Did I mention that I am astonished?
Craig
I am astonished. I could not live without the debugger, spending LOTS of time there in every project I work on, large or small, and I also write perfect code.but I rarely need it. I can usually figure out what I need from a well-placed answer dialog faster
Did I mention that I am astonished?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Red dot breakpoints do not stick in v9
Good work there, Simon. Excellent report, and illuminating discussion.Simon Knight wrote: ↑Wed May 15, 2019 8:24 amThis sounds much like it might be related to this bug report https://quality.livecode.com/show_bug.cgi?id=19173 that I submitted the other year. The report was about saved breakpoints not working but the worry was that it seemed that my instance of Livecode was the problem.
@DunbarX:. Take a gander at that discussion. The participants there seem to have the same mix of experiences as we in this discussion here.
It appears that somewhere along the road to the current file format, certain not-yet-identified circumstances have led a small number objects to have erroneous breakpoint records.
Most useful there is the discovery that when this occurs, those who have seen it report that clearing all breakpoints and then saving allows new breakpoints to work as expected.
Two takeaways from that discussion:
1. While it may be difficult to pin down which line of engine code in which version triggers this, those experiencing it seem to have an easy remedy.
2. As with most issues that don't get resolved quickly, it's not because the engine team doesn't want to fix it, but simply that sometimes we find issues that are difficult to reproduce. When a consistent recipe is available, an issue (certainly one involving a feature as critical as debugging) can be resolved quickly, and often is. Here, as with window layering on Linux and a few others, the challenge is that a consistent recipe is hard to come by. In those cases, if the team can't see it, any attempt to fix it would be just random guesswork.
However difficult they may sometimes be to find, consistent recipes for reproducing an error are critical to resolution.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Red dot breakpoints do not stick in v9
People are diverse.dunbarx wrote: ↑Wed May 15, 2019 2:36 pmRichard.
I am astonished. I could not live without the debugger, spending LOTS of time there in every project I work on, large or small, and I also write perfect code.but I rarely need it. I can usually figure out what I need from a well-placed answer dialog faster
Did I mention that I am astonished?
I can't explain why I go weeks at a time without having a problem for which stepping through code seems the best fit. Sometimes it is, other times any number of other methods feel more efficient.
Maybe it's cognitively similar to Strict Variable Enforcement. Some swear by it; others of us find it cumbersome.
It's like bracket placement in C or JavaScript, or the infamous dangling "then"s I sometimes see in xTalk.
If I could explain the psychology behind differences in coder habits I'd have a very different job.
But given how long such differences have been around, I'll bet there's a study (or twelve) on that in the ACM archives.
It might be interesting to see how coding habits correlate with other lifestyle habits. Is there a correlation between coders who rarely step through code and coders who bake their own bread, or prefer a bicycle as their primary means of transportation?
Now you've got me tempted to consider a research project, and I'm supposed to be doing more mundane things like making software.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Red dot breakpoints do not stick in v9
I discovered a punchline to this story: while researching the issue, I did a search for "LiveCode breakpoints ignored" at Duck Duck Go.
What I found was a few discussions relating LiveCode, and a lot of discussions about ignored breakpoints in other IDEs across a wide range of languages.
This seems a tricky issue for many, independent of which tools and languages they're using.
Maybe not surprising, given the nature of task. A friend describes such things as "sticking your fingers between rotating fan blades to adjust the motor."
What I found was a few discussions relating LiveCode, and a lot of discussions about ignored breakpoints in other IDEs across a wide range of languages.
This seems a tricky issue for many, independent of which tools and languages they're using.
Maybe not surprising, given the nature of task. A friend describes such things as "sticking your fingers between rotating fan blades to adjust the motor."
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 854
- Joined: Wed Nov 04, 2009 11:41 am
- Location: Gunthorpe, North Lincs, UK
Re: Red dot breakpoints do not stick in v9
and how!People are diverse.
While I do occasionally use breakpoints I prefer writing program status out to a field I normally name debug.I can't explain why I go weeks at a time without having a problem for which stepping through code seems the best fit. Sometimes it is, other times any number of other methods feel more efficient.
I'm on the cumbersome side of the fence but I suspect that it is down to how we use variables and the typical length of our routines. For me variables have short lives and are never global. I try to keep the length individual handlers to no more than what may be displayed on a single screenMaybe it's cognitively similar to Strict Variable Enforcement. Some swear by it; others of us find it cumbersome.
"{" I find C and JavaScript hard to read which one of the reasons I use Livecode. Not sure what a dangling "then" is but I am happy to believe that they are "bad news".It's like bracket placement in C or JavaScript, or the infamous dangling "then"s I sometimes see in xTalk.
"}"
I'm not surprised and it shows that we most be careful of not falling into the trap of thinking that other languages and IDE are fault free.and a lot of discussions about ignored breakpoints in other IDEs across a wide range of languages.
On a more tech note : I am happy to report that so far the line numbers in 9.04 have stayed fixed to the lines of code which was not always the case in 9.03.
best wishes
Skids
Skids
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Red dot breakpoints do not stick in v9
History has seen the human capacity for committing atrocity. Dangling "then" is among the more horrifying.Simon Knight wrote: ↑Thu May 16, 2019 9:43 amNot sure what a dangling "then" is but I am happy to believe that they are "bad news".
A sane person would write:
Code: Select all
if SomeCondition is true then
doSomething
end if
Code: Select all
if SomeCondition is true
then
DoSomething
end if
Worse, this crime against humanity is not only supported in the LiveCode engine, but has been offered as some sort of legitimate option in every xTalk I've seen going all the way back to HyperCard 1.0.
I'm told Saddam Hussein used to study the dangling "then" when dreaming up news ways to hurt people.
Good to hear. Thanks. I haven't spent much time in 9.0.4 yet, but I have a long couple days ahead of me and will remember to look for that.On a more tech note : I am happy to report that so far the line numbers in 9.04 have stayed fixed to the lines of code which was not always the case in 9.03.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Red dot breakpoints do not stick in v9
Huh, I'm glad you clarified, for a while I thought you were talking about something like
on one line (one of my favorites)
Code: Select all
if statement then do something
-
- Posts: 854
- Joined: Wed Nov 04, 2009 11:41 am
- Location: Gunthorpe, North Lincs, UK
Re: Red dot breakpoints do not stick in v9
No, I don't believe it - they never do, why ?
The world has gone truly mad: Brexit, Trump and now dangling "then"
I'm off for a lie down.
S
The world has gone truly mad: Brexit, Trump and now dangling "then"
I'm off for a lie down.
S
best wishes
Skids
Skids
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Red dot breakpoints do not stick in v9
Going back to red dots.
9.0.4 seems to hold from a trick earlier in this thread by Simon:
1) open up the stack with the breakpoint issue.
2) select clear all breakpoints from Debug menu.
3) Save Stack
4) quit Livecode
5) launch Livecode and re-open offending stack.
6) Add breakpoints.
If I am working for a long time in a stack then it is well worth the small exercise above. Perhaps these dots are getting more stable...
Thanks to Richard for directing me there.
Craig
9.0.4 seems to hold from a trick earlier in this thread by Simon:
1) open up the stack with the breakpoint issue.
2) select clear all breakpoints from Debug menu.
3) Save Stack
4) quit Livecode
5) launch Livecode and re-open offending stack.
6) Add breakpoints.
If I am working for a long time in a stack then it is well worth the small exercise above. Perhaps these dots are getting more stable...
Thanks to Richard for directing me there.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Red dot breakpoints do not stick in v9
I wish I could take credit, but it was the contributors to the bug report who found that solution.
Glad it's working for you too.
Now we can focus our kvetching on window layering in Linux.
Glad it's working for you too.
Now we can focus our kvetching on window layering in Linux.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 854
- Joined: Wed Nov 04, 2009 11:41 am
- Location: Gunthorpe, North Lincs, UK
Re: Red dot breakpoints do not stick in v9
Ho Hum,
And now they stick.....
Now I am unable to clear breakpoints in 9.04. The red dot clears but the code still stops. Pressing continue causes it to exit. I tried the the global clear, saving and closing, restarting but they still stopped execution.
Fortunately the deleted points were all inside a single button so I copied the code from it to a text editor, deleted the original, hit apply then copied the code back in from the text editor.
best wishes
Simon
And now they stick.....
Now I am unable to clear breakpoints in 9.04. The red dot clears but the code still stops. Pressing continue causes it to exit. I tried the the global clear, saving and closing, restarting but they still stopped execution.
Fortunately the deleted points were all inside a single button so I copied the code from it to a text editor, deleted the original, hit apply then copied the code back in from the text editor.
best wishes
Simon
best wishes
Skids
Skids
Re: Red dot breakpoints do not stick in v9
I'm curious, doesn't just cutting/pasting the code back work anymore?I tried the the global clear, saving and closing, restarting but they still stopped execution.