How to enable debugging
To enable debugging, please place the cursor inside the <HEAD> section of your HTML document, then select HTML / Debug from the menu and click OK. The Editor will do the following:
Paste one line of code into your document:
Copy one tiny file into your document directory:
After that, you will be able to trace your variables and objects and debug your scripts:
Select View / Internal Page Viewer from the menu (or press F5)
At any stage you can inspect what any selected variable holds: inside your document editing view, double-click on a variable to select it (or use the mouse to highlight it), and select Build / Inspect Variable from the menu (or press Shift+Ctrl+V).
Inspect Variable allows you to dynamically examine what the selected variable holds at run-time.
Writing debugging code
To trace your variables and objects, use the following functions from the Operators menu:
PROPERTIES (label, obj);
This function lists all the properties of a given object, e.g. if your HTML document has an image defined as follows:
<IMG name="MyImage" style="position:absolute; left:20;top:200" src="MyImage.gif">
PROPERTIES ("MyImage properties", MyImage);
TRACE (label, expression);
TRACE and TRACE0 allow you to trace your variables (or entire expressions).
For an example, please see RolloverSound.htm in your Debugger directory.
To start debugging, select View / Internal Page Viewer from the menu.
How to disable debugging before publishing your pages on the Internet
Debugger.js is a tiny file that only adds the total of 3KB to your projects, and it should be left in place so that you could reactivate debugging every time you need it. To disable debugging, open Debugger.js and change Debugger=1; to: Debugger=0;
This stops any of the debugging code from executing.
The following example illustrates how to call functions from within the Editor:
In the Project pane, open the Solutions / Cookies solution and double-click Cookies.htm and Cookies.js to open them in the Editor. ( Cookies are stored in a text file and used by your browser. They consist of name=value pairs, with some optional information - expiration time, path, domain, and the "secure" keyword. Cookies.js has functions that allow you to store and retrieve cookies. )
Click on the Cookies.htm tab to make it the active window, and select View / Internal Page Viewer from the menu to view the page
Click on the Cookies.js pane to make it the active window, then click on the SetCookie() function to select it, and right-click to display the pop-up menu
Type the name and the value parameters like in the example above. You can leave the remaining parameters (expires, path, domain, and secure) empty. Click OK.
The function was invoked, and the cookie was stored. The function has no return value, which shows in the status line.