Shortcuts Tips: Use ‘Show Result’ for Troubleshooting

Using the Show Alert’ action copiously throughout the testing phase of building a shortcut has been the best way to check if you are getting the output you want. It works great for one particular reason: It has an optional Cancel’ button which allows you to stop the shortcut, preventing it from going onto further actions if they aren’t ready.1 You can place it after an If’ block to make sure the logic works out right. You can place it after a Replace Text’ action to check that it alters the correct text. You can put it anywhere that you want to pause and verify a variable. There’s just one main drawback to the Show Alert’ action — it excels at showing text but not much else.

A shortcut showing that no image is displayed when passing a file into the ‘Show Alert’ action.
Not quite what I wanted.

You, the Shortcuts extraordinaire, are probably saying to yourself, I know an action that does really well at showing any sort of result! Why doesn’t he just use that?” You’re thinking of the aptly-named Show Result’ action. It does, indeed, do a great job of displaying images, videos, files, locations, and more — all in addition to text. But see benefit #1 of Show Alert’. There’s no cancel button presented in Show Result’.

At least not until (somewhat?) recently. Today, I learned that Show Result’ can now include a Cancel’ button alongside a Done’ one! In fact, it always shows one.2 🥳 If I had to guess, it was probably added as part of the 2022 beta software cycle last summer and I just never noticed. But I’m overjoyed now that we can use a better tool for debugging jobs.

Shortcut showing an image of Rick Astley in a ‘Show Result’ action with a button to cancel.
There we go!

For years, I got by with pairing a Show Result’ action immediately followed by Show Alert’. But when you’re trying to check multiple steps, trying to move those two actions (around a glitchy interface) to the right place and in the right order, frustration abounds. There’s also the Stop and Output’ action which some people said could be used to debug a shortcut, but that I never liked because you’d have to jump back into the Shortcuts editor and scroll all the way to the bottom of the shortcut to see what was output.3

Shortcut example showing that there is no alert and you have to scroll to see the result of ‘Stop and Output’.
No alert, much scroll. Not good, Bob.

But all of that is in the past since Show Result’ gained that glorious cancel button. You can place it anywhere you were using Show Alert’ but with less fiddling around to pass variables into it and get previews for more things. Now we can have our nice results and cancel them too.

  1. Or if you don’t want it to run to completion over and over, spamming your social media with duplicate posts, for example.↩︎

  2. I took a bit of liberty with the term always”. On macOS, there’s only a Done’ button, but you can click the red stoplight button to achieve the same as result a cancel button.↩︎

  3. As I look at Stop and Output’ again today, I can only imagine it being useful for the specific examples it states in its info pane:

    • Running a shortcut from another shortcut (using the Run Shortcut action). The output will be used as the output of the Run Shortcut action.
    • Running a shortcut from Quick Actions in Finder on macOS. The output will be saved as a file alongside the files selected in Finder.
    • Running a shortcut from Services on macOS. The output will replace the selected text, if applicable.
    • Or, when running a shortcut from another location that supports output, like the command-line or the Shortcuts URL scheme.

Shortcuts Tips

❮ Previous post

It’s a Prime Day to Try an Indie App July 11, 2023

Next post ❯

Shortcuts Tips: Using ‘Show Alert’ for More Flexibility July 12, 2023