I made a keyboard shortcut to trigger a script, but it wasn't working.
I stumbled across debug mode, and as soon as I tried the shortcut, I saw this:
[2016-08-28 21:48:58][ERROR: action.script] /Users/adcurtin/bin/NoSleepToggle: line 4: NoSleepCtrl: command not found
/Users/adcurtin/bin/NoSleepToggle: line 11: NoSleepCtrl: command not found
Great, super easy solution: use the full path in the script.
However, I was curious what the path was, so I dropped an 'echo $PATH' in the script, but debug mode doesn't show stdout for some reason, only stderr. This is the first time I've ever had to use 1>&2 in a bash script (which showed me the PATH used is /usr/bin:/bin:/usr/sbin:/sbin)
My suggestion is simply to also display stdout in debug mode (or an option to).