Jump to content

Debugger should show (live) workflow stderr output even when workflow exits cleanly


Recommended Posts

The new debugger is an extremely welcome addition, as Alfred's previous utter silence in the face of errors was very frustrating when trying to debug errors not obviously located within the workflow itself.

 

However, I'd love to see its scope expanded somewhat to make it a useful workflow debugger as well as an Alfred one, so it's no longer necessary to also implement logging/debugging within workflows themselves (which is busywork that distracts from the important, fun and value-adding business of creating workflow functionality).

 

Because Alfred currently only displays the workflow output if the workflow exits improperly, it's no help debugging non-fatal errors (mistakes in logic; exceptions logged but caught; incorrect, but still well-formed XML), so workflow authors will still need to bake their own logging solution to track down and squash such errors.

 

If Alfred always displayed workflow output to stderr, regardless of exit status, this would save workflow developers a fair bit of coding busywork and/or time hand-holding less technically-inclined users through the somewhat arcane process of digging a log file out of ~/Library or running the workflow from Terminal.

 

Showing the received XML in the case of an XML Parse Error would also be very helpful: the row and col numbers aren't particularly helpful without it.

 

Link to comment
Share on other sites

I definitely plan to improve the debugger over time... the 2.2 puts in place the debugging infrastructure to build upon :)

 

In actual fact, I may remove the termination status code check before 2.2 is released and always show the error output if there is one.

Link to comment
Share on other sites

If Alfred always displayed workflow output to stderr, regardless of exit status, this would save workflow developers a fair bit of coding busywork and/or time hand-holding less technically-inclined users through the somewhat arcane process of digging a log file out of ~/Library or running the workflow from Terminal.

 

Showing the received XML in the case of an XML Parse Error would also be very helpful: the row and col numbers aren't particularly helpful without it.

 

If you update to 2.2 pre-release b241, Alfred now shows debugger output when there is stderr even if there is no exit code from the script.

 

Also, when there is an XML parse error, the XML output is displayed.

 

Thanks for the feedback!

Link to comment
Share on other sites

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...