Debugging Tips and Tricks
The following tips can help you find errors in your scripts more easily while you are using Microsoft Script Debugger.
-
If you are debugging server scripts, enable the Script Debugger for the ASP application they appear in. If the debugger is not enabled on the server, error messages are passed as text to the client browser, but you cannot use the Script Debugger with your server scripts. For details about enabling and disabling the debugger for ASP applications, see "Debugging ASP Scripts" in the IIS documentation.
-
When the Script Debugger is enabled for one or more ASP applications, all server errors are passed to the debugger. Therefore, you should not enable the Script Debugger for an ASP application unless you can work on the server itself.
-
If you are working in a client browser that is not on the server and if an error is displayed on the page, there is an error in the server script. If an error message is displayed in a dialog box, the error is in a client script.
-
If there is a syntax or runtime error in an .asp file and if debugging is enabled for that ASP application, the client browser will not display the syntax error (unless the browser is running on the server). Instead, the client browser displays an error indicating that the browser cannot open the page and eventually times out.
-
When looking at line numbers in error messages:
-
If there is an error in the server script, the line number displayed in the error message points exactly to the error in the .asp file.
-
If there is an error in a client script of an .asp file, the line number does not point to lines in the .asp file. Instead, it points to a line number in the HTML output of that .asp file. To see the line where the error has occurred, view the source of the HTML file in the client browser. Do not view the .asp file.
© 1997 by Microsoft Corporation. All rights reserved.