views:

665

answers:

2

What tips and tricks do you have for debugging AppleScript? Is there a debugger? If not, what is the best way to insert "prints" to display the value of variables? Is there a way to "pretty print" more complicated data structures?

+2  A: 

There is Script Debugger

Mark
$199! Ouch! That's too expensive for someone (like me) who writes the occasional short script (and then forgets all about AppleScript in the weeks that pass until the next time).
Daryl Spitzer
+3  A: 

If you're building any amount of AppleScripts, ScriptDebugger is the best tool I can recommend. Having said that...

Xcode is a free option that can be used to develop AppleScripts and can step through code with the debugger. The ability is primarily included so you can build Cocoa applications with AppleScript Studio, but you could use it for any AppleScript development.

If you're looking for something simpler, you might check out Smile, which isn't really a debugger, but does offer features useful for debugging that aren't available in the standard Script Editor.

Chuck