Jump to content

Debugging your workflows

Recommended Posts

Just wanted to share a few quick tips for debugging. If you're using /bin/bash to run a script, you can add "2> error.log" to output errors to a file. Example:

ruby script.rb "{query}" 2> error.log


All errors will then be logged to error.log in your workflow's folder.


Or if you want all output logged (perhaps so you can view the xml from a script filter), you could use tee:


ruby script.rb "{query}" 2>&1 | tee output.log


That'll log errors from stderr in addition to standard output. Note that PHP doesn't output to stderr, so if you're using PHP you'll have to check PHP's error log instead.


Also, if you have any formatting errors in a script filters' XML, Alfred will log it to Console.app.


Hope this helps, and feel free to share your own tips.


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...