Skip to main content

How to Debug Local VBScript

For a long time, I didn't know any better way to "debug" a VBScript than to find where it blew up from the error message and put MsgBox() statements right before it. Eventually I needed a better way, and I found this quick and easy tip.
  1. Open command window
  2. <cscript|wscript> <file.vbs> //X
Now when the script throws an error, you have the opportunity to run the script debugger such as Visual Studio 2010. In my case, it I use Visual Studio Professional, but I think it will work with the Express Editions as well.

Comments