Share

Debugging a Visual Basic script

The Microsoft Script Debugger can help you to locate and fix bugs in a Visual Basic script.

Download the debugger from Microsoft.

You can invoke the debugger in several ways.

  • If the script crashes, the debugger starts at the line which caused the crash.

    To enable this behavior, turn off Disable Script Debugging in the Advanced tab of the Internet Properties item in the Control Panel.

  • Insert the STOP statement in the script to launch the debugger when the statement is reached.

    Assistance for the STOP function can be found by searching the Microsoft support page. http://support.microsoft.com

  • Invoke the script from the MS-DOS command line:

    wscript //d //x scriptname.vbs

Was this information helpful?