Shortcuts can become quite lengthy, and troubleshooting a problematic shortcut can be frustrating. For those new to the Shortcuts app, I thought I would briefly mention a few approaches that can be helpful.
The approach I use most often involves the Show Content action, which previews input received from another action. The content of the preview varies and can be the first page of a PDF, the name of a folder, or the items in a list. In the following example, the result of a calculation is displayed.
A similar approach is the Stop and Output action. The primary difference is that the input is previewed in the Shortcuts Editor at the end of the shortcut instead of in a dialog.
A shortcut error can often arise from a magic variable not referencing the intended action. In the following example, the third action has two magic variables, and they both incorrectly reference the first action of the shortcut (i.e. the number 10). Magic variable reference errors are easily checked by clicking on the magic variable, which displays the Variable Editor. You can then click on the Reveal button, and the Shortcuts Editor will show and faintly (too faintly IMO) highlight the referenced action.
Magic variable reference errors can also be checked by naming magic variables (which is a good idea regardless). In the following example, the default name for both of the magic variables in the Calculate action is Number. When I renamed the first magic variable to The Number 10, the second magic variable was also renamed to The Number 10. This made clear a reference error.
After fixing the reference error, I renamed each Magic Variable as follows:
Another troubleshooting tool is the Show Content Graph action, which displays a dialog describing the result of the previous action. Clicking on a description shows a content graph for that item. I don’t use this action often, but it can be helpful in some circumstances.
Finally, consulting the documentation can help. Each action has an Info pane which explains the operation of the action. For example,
Also, the Shortcuts User Guide is excellent and can be found here.











