General Interface Builder provides a JavaScript console to assist in executing and debugging JavaScript code. The JavaScript console:
- Displays a running list of commands and command output.
- Allows you to drill down into nested data structures from command output.
 | The JavaScript console replaces the JavaScript Test Utility that was available prior to General Interface Release 3.9. |
To open the JavaScript console, choose Tools > JavaScript Console in General Interface Builder. 
In the console, you can use the up and down arrow keys to scroll through the command history. The history is saved even after General Interface Builder is closed and reopend. For example, if you enter the command document.body or jsx3 in the console, the string representation of an object is shown with a collapsed arrow to its left. You can click the arrow to expand the object. Any nested objects can also be expanded.
Property keys are shown in purple, except when the value of the property is inherited from the object's prototype, in which case the key is shown in gray. Function and Array outputs are also shown.
To clear the console history, type Ctrl+K or right-click inside the console and choose Clear Console.
By default, the console evaluates the input when you press Enter. The console supports multi-line input. You can paste the multi-line text at the prompt or type Shift+Enter to insert a carriage return.
Code Execution
All code evaluated by the JavaScript console is executed in window scope. For example, if you evaluate the following statement:
you have actually set the property f of the top-level object window. If you set a global variable in this way, it becomes available to subsequent expressions that you evaluate in the console.
 | The form var f = 1; does not have the same behavior as f = 1;. The value of f is not available to subsequent expressions if it is set in this way. |
If the active editor is a JSX component editor then each DOM node in the component is exposed as a variable in the JavaScript console. For example, if the component contains an instance of jsx3.gui.TextBox whose name is set to "textBox," then the variable textBox will be equal to the TextBox instance when evaluated in the console. Please note that,
- Only objects whose names are valid JavaScript variable names are exposed. The name must match [\$a-zA-Z_][\$\w]*.
- The behavior of name collisions is not defined. If you have two or more objects in the same component with the same name, the corresponding variable may reference either one.