Export (0) Print
Expand All

Debugging Client-Side Scripts in Your Application

Visual Studio .NET 2003

There are several ways that you can debug the client-side script in your application:

Note   To debug script you must enable script debugging in Internet Explorer. 

From Microsoft Internet Explorer

To debug a client-side script from Microsoft Internet Explorer

  1. From the View menu, select Script Debugger and click Open. This launches the Just-In-Time Debugging dialog box.
  2. From Possible Debuggers list in the Just-In-Time Debugging dialog box, select New Instance of Microsoft Development Environment and click Yes.
  3. In the Attach to Process dialog box, in the Choose the program types that you want to debug box, select the Script check box and click OK.

To specify that the debugger stop at the first statement of scripts

  1. From the View menu, select Script Debugger and click Break at Next Statement. This launches the Just-In-Time Debugging dialog box.
  2. From Possible Debuggers list in the Just-In-Time Debugging dialog box, select New Instance of Microsoft Development Environment and click Yes.
  3. In the Attach to Process dialog box, in the Choose the program types that you want to debug box, select the Script check box and click OK.

    From now on, when any script is executed, the debugger stops at the first statement of the script.

Using the Running Documents Window

The Running Documents window shows a list of documents that are currently loaded into the program you are debugging. For example, in an HTML frameset, the Running Documents window can show you the pages currently loaded in the browser. You can use the Running Documents window to open a document and set a breakpoint inside the script code. You can also use this window to see and debug code that is generated by script on the server and sent to the client.

In a Script

When writing a script, include a Stop statement (VBScript) or debugger statement (JScript). When script execution reaches that line, the Visual Studio .NET debugger is launched.

In Response to an Error

If the browser or server encounters a syntax error or run time error in a script, it displays a message that offers you the opportunity to start the debugger at the line where the error occurred.

See Also

Debugging Client-Side Scripts | Debugging an ASP.NET Web Application

Show:
© 2014 Microsoft