How do I debug AppleScript?

Daryl Spitzer picture Daryl Spitzer · Sep 23, 2009 · Viewed 51.1k times · Source

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?

Answer

tuomassalo picture tuomassalo · Nov 10, 2010

For very simple "printf style" debugging needs, try

display dialog "my variable: " & myVar