Share via


Executing Commands and Evaluating Expressions in the Immediate Window

To view and change values, you use the Immediate window. You can evaluate any expression, variable, or object in the window and see the value that is returned, or you can see the effects of commands you enter (which must be in the language of the code currently executing).

Rules for inspecting values and entering commands may vary slightly for different languages. For more information about a specific language, see the debugging topics for that language.

Once you're in break mode, you can move the focus to the Immediate window to examine data. You can evaluate any valid expression in the Immediate window, including expressions involving properties or variables. The currently active function on the call stack determines the scope.

You can also enter commands in the Immediate window to execute procedures or change the value of variables or properties; these commands will be executed immediately. The syntax and rules for executing commands are dependent on the language engine.

To execute a statement again

  • Move the insertion point back to that statement. You can edit the current statement to alter its effects, and then choose Set Next Statement from the Debug menu.

To move around in the Immediate window

  • Use the mouse or the arrow keys. See "Immediate Window Keyboard Shortcuts" for how to navigate the Immediate window with the keyboard.

    Don't press ENTER unless you are at a statement you want to execute.