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. 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.
-
When the Script Debugger is enabled on the server, all server-side errors are passed to the debugger. Therefore, you should not enable the Script Debugger on the server 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 error in an ASP page, 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 page.
-
If there is an error in a client script of an ASP page, the line number does not point to lines in the ASP page. Instead, it points to a line number in the HTML output of that ASP page. 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 page.