Whatever you are using to run the script should be configured to capture stdout and stderr.
https://www.bing.com/search?q=windows+capture+stdout+stderr
If you are using a .bat file, have it run the script like this.
cscript.exe c:\Scripts\MyScript.vbs 1> c:\Scripts\Logs\MyScript.log 2>&1
If the script contains "on error resume next", you can comment that line out and just let it crash when it hits an error. Then check the log file. Otherwise your script needs to test err.number more frequently and gracefully handle any error condition.
https://www.bing.com/search?q=vbscript+err.number
If your script accesses network shares then a common problem is that the account that is running the script does have access to the remote server.