Understanding how scripts in ASP pages are processed and how errors are handled can help you debug server scripts successfully. To debug server scripts ù scripts in ASP pages ù you run Microsoft Script Debugger on Microsoft Internet Information Server (IIS), version 4.0 or higher, and attach it to a currently running document.
Note To debug client scripts, you must run Microsoft Script Debugger on the same computer that is running Microsoft Internet Explorer. For more details, see Client Script Debugging.
Script in an ASP page is not event-driven. Instead, when the page is requested, the server reads the page and processes all server script from top to bottom. This includes code that is inline with HTML text, as shown in the following diagram.
[Need DcScrSvr.bmp here]
Because all code in the ASP page is processed as soon as the page is requested, both syntax errors and runtime errors are caught immediately.
A special case for server scripts is the Global.asa file. The Application_OnStart and Session_OnStart procedures in this file are executed only once for an application and for a session. Therefore, you must embed debugging statements in the file. For details, see Debugging the Global.asa File.
To use Microsoft Script Debugger, you must be sure that the debugger is enabled. For details about enabling and disabling the debugger for IIS, see ôDebugging ASP Scriptsö in the IIS documentation.
If the debugger is enabled:
Note If the debugger is enabled on the server, someone must attend the server to view and acknowledge error messages.
If the debugger is disabled:
See Also