Home > Running a Script > Running a Script in Debug Mode > Watch Variables

Watch Variables

The Editor window includes a bottom pane, called Output window, with two Tabs, the Compiler Tab where the compilation errors are listed, the Watch Tab which is explained in this article. If this Output window is not displayed, select View/Output window menu.

In the Watch Tab, you can specify the variables that you want to see the value when the script runs in debug mode.

To add a new variable, click Click to add new variable or press Insert. The Value column tells <no_value> and will be populated during script execution. To delete a variable, select it and press Del. To delete multiple variables, select them using Shift or Control and press Del. To rename a variable name, select it and press F2.

The list of Variables to watch is for all the opened scripts within the Editor. When the Editor window is closed, the list vanishes.

Local variables can be watched in this list. Of course, they will reflect <no_value> outside the Sub/Function which uses them.

Only one element of an array variable can be watched on one line, so you can insert a variable such as array$(1) or array$(i), where i changes during script execution.
The Value column is a one-line field, so if the value is on several lines, you will notice on the long line square characters for the CRLF.

When you are in Debug mode and execution is stopped (step by step execution, stop at a breakpoint or at cursor), you can add a variable to watch and the Value column returns immediately its value.

See also

About Debug Mode
Debug Mode in Action on a Sample Script
Step by Step Execution
Step Over
Step Out
Run To Cursor
Breakpoints
Debug Toolbar