Another "Runs in Script Editor but hangs in Script Debugger" puzzle



Hmmm - I don’t see how to post AppleScript, so I’ll just describe the issue:
Editing and saving my script as an .app in Script Debugger, it controls a Numbers document fine when run from Script Debugger.

However, when double-clicking the .app file in the Finder, Script Debugger hangs and the top of the source code window is yellow and says “Tell Application …” but no error message. The line highlighted is the first line of executable code. In the Log there is something about a (current date) generating a security error. And the script does not execute (hangs on first line of code).

Now, if I copy the whole script and paste into Script Editor, compile as .app, and save it, it all runs fine, from the Editor, and from the .app in the Finder, and controls the Numbers document as expected.

I want this script to run from a launchd plist, and I have some more things to add, so I’d like to edit it in Script Debugger.

Anyone know why the .app hangs when compiled and saved as .app from SD, but the exact same code runs fine when compiled and saved as .app from Script Editor?

(Shane Stanley) #2

It sounds like you’re saving it with debugging on. Open it in SD, make sure debugging is off, and save.


Yes indeed. Thank you for your reply. This must be a very frequent issue for those of us who forgot it from the last time we used SD since the symptoms don’t suggest the problem!

I read elsewhere why this is. I’ll make a note of it for sure. My script now runs without problem.

(Jim Underwood) #4

Enter/paste the AppleScript between lines of triple back quotes, like this:

– Your script here

If you have tabs in your script it is best to convert them to spaces before you paste into the forum.


Ah! Thanks for the help.