Executing Script Commands

You can use the Command window to execute script commands directly  ù that is, without having to place them in a script and then run the scriptÆs document. By running script commands in the Command window, you can:

When you use the Command window to execute script commands, you are working in the same environment as the current scripts and can therefore affect the way the script runs. For example, you can use commands in the Command window to change the values of variables or properties and therefore change the way a script executes. You can also create new objects and properties in the Command window exactly the way you would in a script.

You can execute script commands any time that you are at a debugger breakpoint or have stepped from a breakpoint to other statements.

When using the Command window, use the language of the currently executing procedure. For details about script commands, refer to the documentation for your scripting language.

To execute script commands immediately

  1. From the View menu, choose Command Window.

    û or û

    Click on the Debug toolbar.

  2. In the Command window, type in the command, and then press ENTER.

When you enter commands into the Command window, error messages are not sent to the browser. Instead, the Command window handles the error itself by displaying a message, as shown in the following illustration:

See Also

Choosing a Document to Work With

Debugging Java Applications

Viewing and Changing Values


© 1997 by Microsoft Corporation. All rights reserved.