dunbarx wrote: ↑Thu Jul 23, 2020 2:06 pm
Richard.
but at least you'll be able to stop debug mode without waiting for 30 seconds.
Are you serious about that time delay? I see only instantaneous transitions from one mode to another. Can you give a recipe?
Unfortunately it's intermittent, so no recipe as yet.
It happens when I encounter a bug while debug mode is active, and it brings up the editor to the errant line. So far so good. But when I click the square icon to cancel debugging so I can fix the error, it sometimes hangs for up to 30 seconds or so, occasionally longer.
Obviously that's no one's design choice, but if you've looked at the editor code in depth it becomes clear how such unusually long calling chains might occasionally make recursive calls unintentionally.
A good example of the non-xTalk-style complexity is the line number field, which may or may not be related to the debugging delay but has been widely observed:
Old schoolers would likely implement line numbers prepopulated, so the only thing that needs to be done is a scrollbarDrag message in the editor field keeping the scroll of the line numbers in sync. It's a one-line handler that way, and in a scripting language moving work to the engine helps.
I haven't invested the time to discover whether the SE's line numbers are dynamically populated (the sort of thing a C programmer would expect to do), but whether for that or some other reason the line numbers sometimes fall out of sync. I can't yet say why, but when I don my safari hat and go exploring in that jungle I find there's enough complexity in what's happening during scrolling that it's a bit of an effort just to wrap my head around it
All I know is many have observed what I have, that the line numbers frequently fall out of sync with the main editing field, and remain unpredictably off until you click the insertion point into a new location.
That this often happens during debugging is especially tedious, since we need to review the line number specified in the error info, and we can't know what that is when the line numbers are off.
To be fair, I believe the team has been made aware of this, and has been working on it. And I'm not certain I've seen it with the very latest build, though I have in recent weeks before it.
And I know there's not a lot of truly wasted code in there, it's just biting off a lot on actions that are important to perceptions of performance, like selectionChanged. But there is some code in there which is just inexplicable, such as the two different execution paths for saving (trace out menupick and then trace out Ctrl-S).
The SE currently in the IDE was a complete rewrite replacing the one from v1.0. From time to time a rewrite is the right choice (McConnell touches on that in his book Rapid Development). When the then-new SE premiered it was the reason I stopped maintaining my own, and the other parts of the MC IDE, and started using LC's IDE.
But over time, features and fixes have grown the SE code into something at the edge of unmanageable. Indeed, observe how many team members cite using external editors.
It's time for another rewrite. But with so many priorities and the team using external editors, it's a community task, not all that out of place for a tool where most users run the Community Edition.
Mark Weider's GLX2 is one response to this need. And it's very feature-rich, impressively so.
And thanks to a generous benefactor sharing the investment with me, another SE is in the works to provide a different focus, one that emphasizes lean operation and maintainability
Like Dr Raney used to say about tools, "Let a thousand flowers bloom."
With multiple script editors, debuggers, object browsers, inspectors, and other dev tools to choose from, each of us can tailor the IDE experience to become the exact toolkit we most want.