Output from run scripts gives some ideas on how to set up logging for debug.
Of course, you can instead instrument the script to echo debug clues to a file.
Depending on script exit code, you might get a warning or error, but you should see it, if it happened.