Visual InterDev
From Microsoft® Visual InterDev™ you can debug server script that executes on Microsoft® Internet Information Server (IIS). If IIS is running on your computer, you can debug server script in much the same way that you debug client script. If the server is on another computer, you can use remote debugging from your computer to find errors in the server script. For details, see Debugging Remotely.
You can debug server script in any of these ways:
Note To debug script in ASP pages, you must be running version 4.0 or later of Microsoft Internet Information Server (IIS).
Note If you are writing ASP pages that use the scripting object model, you can set options that help you find errors and trace events. For details, see Debugging Script Objects in ASP Pages.
If a Web page contains a mixture of client and server script, you can use the Visual InterDev debugger to debug both. For details, see Debugging Mixed Client and Server Script.
Before you can debug client script in ASP pages, you must enable debugging. You can manually enable debugging for your ASP application as described under "Enabling ASP Debugging on the Server" in the Troubleshooting topic. Alternatively, Visual InterDev can automatically enable debugging on the server as needed.
To automatically enable script debugging in ASP pages
When this option is set, each time you start a debugging session Visual InterDev checks that the server is configured for debugging. This includes:
Note You can perform the first two steps manually on the server. For details, see "Enabling ASP Debugging on the Server" in the Troubleshooting topic.
When you quit your debugging session, Visual InterDev restores the server debugging settings and out-of-process setting to their previous values.
If you are working in a Visual InterDev solution, you can debug server script by launching the debugger.
Note Before debugging server script, make sure debugging is enabled as described above or under "Enabling ASP Debugging on the Server" in the Troubleshooting topic.
To debug server script from within a solution
Visual InterDev attempts to attach the debugger to the document running on the server.
If debugging has been enabled on the server for your project and you detect an error while the application is running, you can attach the debugger to it. For details about enabling debugging on the server, see "Enabling ASP Debugging on the Server" in the Troubleshooting topic.
You can attach to a running document only if attaching is enabled.
To enable just-in-time debugging
To debug a running script
If debugging is enabled for an IIS application on the server and the server encounters a syntax error or run-time error in a server script, you can use just-in-time debugging to find and fix it. You can also include a statement in your script, such as a Stop
statement in VBScript or a debugger
statement in JScript, to launch the debugger from within a script. For details about enabling debugging on the server, see "Enabling ASP Debugging on the Server" in the Troubleshooting topic.
Note If a debugger is installed on the server computer, the server does not pass error information through to the client. Instead, it displays an error message on the server computer's monitor. For more information, see "Just-in-Time Debugging of Server Pages" in the Troubleshooting topic.
You can launch the debugger in response to an error or debugger statement only if just-in-time debugging is enabled.
To enable just-in-time debugging
To debug server script in response to an error or debugger statement
The page to debug is loaded into the editor. If necessary, get a working copy of the page. If the project is already open, the page is loaded as read-only file in the new project.
If server debugging is not enabled for the application, errors are displayed in the browser as text in the page. In that case, open the project containing the page in Visual InterDev and start the debugger there, as described above.