sxalexander
-
Posts
2 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by sxalexander
-
-
This is my most sought after Alfred update (of the moment =)). Any way to do with without a thirdparty app?
Alfred 3 Tip: Use stderr to output to the debug console
in Workflow Help & Questions
Posted · Edited by sxalexander
I love Alfred but I struggled at first to troubleshoot my workflow scripts due to difficulty finding a way to debug. I've seen posts mentioning writing logs to an external file but that seemed hack-y, especially since Alfred includes a debug console. If you'd like to use the console to debug your scripts, I found the following very useful. It would be great if there were a mention of this in the docs:
To show script output in the debug console, print (or echo or put, etc) the output to stderr instead of stdout.
In a Bash script:
In a Python script:
For other languages, look for an equivalent method that allows you to log to stderr.