Immediate Window

The Immediate window is used to run commands immediately. To display the Immediate window, enter break mode, point to Windows on the Debug menu, and then click Immediate. For example, typing

? myString in the Immediate window returns Nothing if a value has not been assigned.

The advantage of using the Immediate window over the Autos window is that you can type formulas into the Immediate window. For example, you cannot type myString = "test string"

in the Autos window (you can type only the value of myString), but using this formula in the Immediate window works just fine.

Keep in mind that the Immediate window, Watch window, Locals window, and Autos window are not just informative. You can change the values from within these windows. You can test your code in the middle of execution by changing a variable to an expected value and continue running your code. It simulates what would happen if the code had the expected value to begin with. In this way, you can continue debugging your code without having to stop execution and rerun the code.

0 0

Post a comment