When I open a script in Script Debugger, the cursor position is always at the bottom of the window. I would prefer Script Debugger remember the cursor position, or allow a choice of it’s default position (e.g. top or bottom).
tell application "Script Debugger"
tell front document
set selection to {1, 1}
end tell
end tell
That’ll set it to the beginning of the document. If you use a template like I do for all new scripts, you can adjust the first number in the list {1,1} to wherever you normally start working on a new script. The snippet itself you could put in FastScripts or some other script runner.
It would be nice to have a SD preference of where to position the cursor when opening an existing document, but ⌘↑ works fine for me. Simpler than finding a script to run.
Sure, if you want it at the beginning or end, but if you want it somewhere specific, and it’s always the same place (i.e., if you use templates), it’s no chore to assign that a hotkey and invoke it straight after Command-N.
Looks like a regression. Script Debugger is supposed to restore the selected range from when the script as last saved. As I play with it here, it seems this is no longer happening.
Open in Tabs was and is off in my Script Debugger, but the same problem persists. I tried switching Open in Tabs on, quitting, switching it off, quitting, but no difference.
Open a script with Open in Tabs on, cursor is at the bottom. Open the same script with open in tabs off, cursor is where I left it when window (or tab) was closed.
–>Script Debugger 6.0.4 (6A198) on Mac OS 10.11.6 (15G1217)
On further testing, with Open in Tabs off, if I open a script when Script Debugger is not already running, the cursor always goes to the bottom of the window. If Script Debugger is already running, the cursor is where it was when the file was saved.
Seems like something Mark should check out at some point.
Either way, the window always opens scrolled down as far as it can be without the cursor being hidden beyond the top of the window. So for example, with the cursor at line 20 in a 200 line script, the window scrolls on opening so the cursor is at the top of the window. A bit hard to describe, and I’m not sure if that’s the intended behaviour.