Debugging With Visual Studio

The debugging facilities in Visual Studio 2006, 2008, 2010 (complete/pro editions) and 2015 Community Edition (recommended) include the ability to debug Windows Scripts. Instructions for configuring and using Visual Studio for script debugging are given below (minor variations between versions):
  1. Start up Visual Studio without a solution.
  2. In the Tools menu, select Options. This will open the Options window.
  3. In the left hand pane, select the Debugging category. This will reveal the debugging options.
  4. Select Just-In-Time. This will display Just-In-Time debugging options in the right hand pane.
  5. Enable Just-In-Time debugging for Script, then click OK.
  6. Exit from VS.NET.
After doing the above, VS.NET will automatically pop up and offer to debug your script if you enabled debugging in ACP or used the //D command line option in Windows Script Host. For general information on debugging scripts, see Scripting Guide - Debugging. See the help for your version of Visual Studio on using its debugger.

Visual Studio functions as a script editor also, nicer than Notepad. Try opening a VBS or JS document from the File menu and see what happens.