Debugger is deleting lines of code while debugging
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 43
- Joined: Fri Aug 21, 2020 7:06 pm
- Location: Denver, CO
Debugger is deleting lines of code while debugging
Today I'm having a curious problem using the LiveCode debugger. I'd appreciate help tracking down the solution.
It happens when I set breakpoints in a script. Upon reaching that breakpoint, I begin stepping through the code by clicking the "step over" button at the upper left. That's this button:
After a few clicks, when I click the button, the line of source code to be executed next disappears from the script. If I cancel execution and look at the script, it is still missing. If I close the script and reopen it, it is still missing. If I close the stack and reopen it, it is still missing. If I exit from LiveCode and restart, and then reopen the stack, it is still missing.
The problem is exacerbated by the fact that if I am not paying very close attention, I don't notice it right away. Subsequently, the script will execute incorrectly, or, for example, if the missing line is the end of a handler, the script has all kinds of errors when it is reopened.
I have noticed this behavior occasionally in a few scripts over the last couple of weeks, usually once or twice a day when I'm debugging. Today it is happening ten times or more per hour or so, and in different places in more than one script.
Have you seen this before? Do you have any suggestions on the cause or the fix? Thanks.
[LiveCode Community 9.6.1; MacOS 11.1]
It happens when I set breakpoints in a script. Upon reaching that breakpoint, I begin stepping through the code by clicking the "step over" button at the upper left. That's this button:
After a few clicks, when I click the button, the line of source code to be executed next disappears from the script. If I cancel execution and look at the script, it is still missing. If I close the script and reopen it, it is still missing. If I close the stack and reopen it, it is still missing. If I exit from LiveCode and restart, and then reopen the stack, it is still missing.
The problem is exacerbated by the fact that if I am not paying very close attention, I don't notice it right away. Subsequently, the script will execute incorrectly, or, for example, if the missing line is the end of a handler, the script has all kinds of errors when it is reopened.
I have noticed this behavior occasionally in a few scripts over the last couple of weeks, usually once or twice a day when I'm debugging. Today it is happening ten times or more per hour or so, and in different places in more than one script.
Have you seen this before? Do you have any suggestions on the cause or the fix? Thanks.
[LiveCode Community 9.6.1; MacOS 11.1]
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Debugger is deleting lines of code while debugging
Big Sur, eh?
I have heard of issues there. Have you tried to run your stacks under OS 10.x? There is a good chance you will not have this problem. The team will take a little time to fix Big Sur problems.
Craig
I have heard of issues there. Have you tried to run your stacks under OS 10.x? There is a good chance you will not have this problem. The team will take a little time to fix Big Sur problems.
Craig
-
- Posts: 43
- Joined: Fri Aug 21, 2020 7:06 pm
- Location: Denver, CO
Re: Debugger is deleting lines of code while debugging
Thanks for the reply.
Actually, I upgraded to Big Sur only six days ago. The problem with the debugger has been around much longer. I'm seeing it more now because for the last two weeks, I've been spending several hours every day on a new project.
I'm still running LiveCode 9.6.1.15522 from August 18, 2020. Is there a newer version?
Actually, I upgraded to Big Sur only six days ago. The problem with the debugger has been around much longer. I'm seeing it more now because for the last two weeks, I've been spending several hours every day on a new project.
I'm still running LiveCode 9.6.1.15522 from August 18, 2020. Is there a newer version?
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Debugger is deleting lines of code while debugging
Hi.
If you have seen this even in earlier OS versions, wait just a bit for others to chime in. I never have, ever. Have you another machine to test your stacks?
Craig
If you have seen this even in earlier OS versions, wait just a bit for others to chime in. I never have, ever. Have you another machine to test your stacks?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Debugger is deleting lines of code while debugging
I have never, ever seen that happen in any version of LC or on any version of OS X. I know you're using somewhat unusual scripting methods while trying to reproduce classes though, so there may be a problem of focus. The script editor is just a stack like any other, and during debugging it becomes the focused stack when a breakpoint triggers. Could one of your other scripts be deleting lines of text?
The editor goes to some lengths to avoid that but you may have hit an exception.
The editor goes to some lengths to avoid that but you may have hit an exception.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Debugger is deleting lines of code while debugging
Bookmark this page and be always uptodate:PlaidFlannel wrote: ↑Mon Feb 08, 2021 6:41 amI'm still running LiveCode 9.6.1.15522 from August 18, 2020. Is there a newer version?
https://downloads.livecode.com/livecode/
Re: Debugger is deleting lines of code while debugging
Hi
This is something I have not seen myself either. I ran it past the team and checked the Quality Control Center and we don't have any other reports.
As Jacque said it sound like it could be an issue related to the focused stack or something similar. Is there anything common between the lines this happens on, are they anything like
or
Or anything along those lines? I think this needs to be reported as a bug but if we can narrow it down a bit that will be helpful.
Kind regards
Elanor
This is something I have not seen myself either. I ran it past the team and checked the Quality Control Center and we don't have any other reports.
As Jacque said it sound like it could be an issue related to the focused stack or something similar. Is there anything common between the lines this happens on, are they anything like
Code: Select all
delete the clickline
Code: Select all
put empty into the selection
Kind regards
Elanor
Elanor Buchanan
Software Developer
LiveCode
Software Developer
LiveCode
-
- Posts: 43
- Joined: Fri Aug 21, 2020 7:06 pm
- Location: Denver, CO
Re: Debugger is deleting lines of code while debugging
Jacque: thanks for your reply.
As a LiveCode beginner, it had not occurred to me that the script editor was just a stack.
As an aside, that explains another issue that I had noticed about the script editor—its text scrolling does not reflect MacOS platform behavior with regard to the System Preference "Jump to the spot that's clicked". Some other LiveCode entities do reflect that preference.
My current project does essentially no text manipulations. It primarily uses scripted painting in image objects to represent attributes of members of a large data set.
Currently, my single card has three different, nonoverlapping image objects available for painting. Below each is a "background" image object, and above each is a transparent "click catcher" button. These give the user the ability to interact with the image, even in places where it is transparent (no paint).
To make all this work, all my handlers that do painting have to move the target image objects to the top layer prior to invoking the painting tools, and then move them back to their original layers after. I think that kind of layer manipulation is the most unusual thing I do.
One other thing that might be worth mentioning is this: I have noted that occasionally while debugging, I'm typing in code and need to scroll to a different place in the script to check on something. While scrolled elsewhere, I don't necessarily notice that my new code still has errors. If I save the script (using the "Apply" button) and close the script tab, I assume that it is saved with those errors. When that script is reopened to display a breakpoint during a debugging run, is it possible the state of the script is unstable in some way?
A symptom that something might be unstable is that sometimes scrolling the script editor window causes the code to scroll but not the line numbers.
As a LiveCode beginner, it had not occurred to me that the script editor was just a stack.
As an aside, that explains another issue that I had noticed about the script editor—its text scrolling does not reflect MacOS platform behavior with regard to the System Preference "Jump to the spot that's clicked". Some other LiveCode entities do reflect that preference.
My current project does essentially no text manipulations. It primarily uses scripted painting in image objects to represent attributes of members of a large data set.
Currently, my single card has three different, nonoverlapping image objects available for painting. Below each is a "background" image object, and above each is a transparent "click catcher" button. These give the user the ability to interact with the image, even in places where it is transparent (no paint).
To make all this work, all my handlers that do painting have to move the target image objects to the top layer prior to invoking the painting tools, and then move them back to their original layers after. I think that kind of layer manipulation is the most unusual thing I do.
One other thing that might be worth mentioning is this: I have noted that occasionally while debugging, I'm typing in code and need to scroll to a different place in the script to check on something. While scrolled elsewhere, I don't necessarily notice that my new code still has errors. If I save the script (using the "Apply" button) and close the script tab, I assume that it is saved with those errors. When that script is reopened to display a breakpoint during a debugging run, is it possible the state of the script is unstable in some way?
A symptom that something might be unstable is that sometimes scrolling the script editor window causes the code to scroll but not the line numbers.