Newbie: Force Script Debugger to refresh changed bundled script

I’m very new to this. Apologies for being dumb.

I have an early script. It’s broken into three subordinate modules. When I change one of the subs, the result is the result from before the change unless I change the top level script to force recompile.

So far, I literally have a comment that I edit to force recompile. It’s extremely annoying and it seems there should be a way to cause Script Debugger to always recompile.

I note that osascript from the command line does not have this problem. It pucks up the changes always.

Thanks for your help.

Welcome!

If you hold down the Option key, Script Debugger’s Compile command activates and changes to Recompile.

The difference is that each time you invoke osascript it runs in a new process and thus a new instance of AppleScript. Nothing is cached run-to-run. By contrast, AppleScript caches quite a bit of information run-to-run behind Script Debugger’s back. The problem you are experiencing is an unfortunate consequence of AppleScript trying to be helpful and more performant.

1 Like

Thank you very much. I knew there had to be a solution.

Dear Script Debugger folk, Please give me a preference to make it so that it always recompiles.