First you uncheck that setting, then you run the script using the tool rather than running it in Photoshop. Eg, choose File -> Open, choose the PhotoshopToSpine script, then make sure Photoshop is running and choose Debug -> Run (or F5). The script runs and execution will stop at any line where an error occurs. Note some lines are expected to cause an error and those are surrounded by try {
and } catch (ignored) {}
. When execution stops at a line like that, choose Debug -> Run (or F5) again to continue execution. The line it stops on just before showing the error dialog is likely the line we are interested in. If you can tell us what line number that is, we should be able to determine why the script isn't working for you. Please also include the text of that line, to be sure we are looking at the same file.