Debug functions are those that allow the user to trace the value of JavaScript variables and the flow of the code.

Use

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="JS_Vision_Globals.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="JS_Vision_String.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="JS_Vision_HTML.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="JS_Vision_Numeric.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="JS_Vision_WindowMgmt.js"></SCRIPT>

Remarks

JavaScript Debugging
Articles
Debugging JavaScript
Advanced JavaScript Tutorial

Software
Microsoft® Script Debugger
Netscape JavaScript Debugger

In the Builder.com article, Debugging JavaScript, Aneesha Bakharia writes that errors come in four types: HTML, syntax, runtime, and logical. Your browser or HTML validator will inform you of any HTML, syntax, or runtime errors that occur (see side panel for Internet Explorer and Netscape syntax/runtime debugging software). The debugging problem arises when the errors are logical -- errors that occur when code that is free of syntactical and runtime errors produce incorrect results. When logical errors occur, the best method to debug logical errors in code is to trace the variables. The simplest way to do this in JavaScript is to use an alert box or write the value to the status bar. Using alert boxes in your code is very helpful. Unfortunately, clicking the "OK" button every other line is a pain.

A much easier method is to monitor the variable's value in a debugging console. That is where JSV_writeDebug and JSV_openDebugConsole become handy. These functions eliminate the user's need to code window.open and document.write statements for each page that they are testing. Tracing JavaScript variables and function flow becomes a matter of calling the JSV_writeDebug function.

For more information on the SRC attribute of the SCRIPT tag, see JavaScript Vision Frequently Asked Questions.