Jump to content
Sign in to follow this  
ClintonStrong

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.

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  
×
×
  • Create New...