Scripting Debugging in Internet Explorer

The information published in this post is now out-of-date and one or more links are invalid.

—IEBlog Editor, 20 August 2012

I thought I’d take a couple minutes to talk about Script Debugging and Internet Explorer.

Script debugging is turned off by default you can enable it by going to:
Tools->Internet Options…->Advanced->Disable Script Debugging

Prior to XPSP2 the above will turn script debugging on for all applications that host the WebBrowser control (Outlook for example).

On XPSP2 we’ve split the option into two:
Tools->Internet Options…->Advanced->Disable Script Debugging (Internet Explorer)
Tools->Internet Options…->Advanced->Disable Script Debugging (Other)

When you’ve enabled Script Debugging ‘View->Script Debugger’ will now be present to help you break into the debugger.

The debugger statement can also be placed anywhere in your code to suspend execution this is similar to setting a breakpoint.
The Stop statement is the VBScript version of JScript’s debugger statement.

There are three applications which I’ve used for script debugging.  One is Visual Studio.Net, the second is Microsoft Script Debugger and the third is Microsoft Script Editor:

Miscrosoft Script Debugger:
You can obtain a copy of the Microsoft Script Debugger here:
https://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en

The main MSDN page for using the Microsoft Script Debugger can be found here:
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdbug/Html/sdbug_1.asp

The Microsoft Script debugger allows you to debug client side and server side scripts and provides the same functionality as most debuggers do.

Directions on using the Microsoft Script debugger can be found here:
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdbug/Html/sdbug_2.asp

Microsoft Script Editor:
The Microsoft Script Editor comes free with Microsoft Office XP/2003 with FrontPage.
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfp2k2/html/odc_fpdebugscripts.asp
 
Visual Studio.net:
For Visual Studio.net debugging Monica Rosculet has written an excellent article on: Debugging Script Code Using Visual Studio.

Other:
Gregg Miskelly a developer on the Visual Studio team has posted some excellent information about: How Script Debugging Works.

-Phil Nachreiner