While in Break mode, you can set the focus to the Immediate window by clicking on it (if visible), by pressing Ctrl + Alt + I, or by hovering the cursor over "Windows" in the Debug menu and clicking on Immediate. When you type a statement into the Immediate window and press the Enter key, the statement is executed at once. A statement of the form ? expression displays the value of the expression on the next line of the Immediate window. (The question mark is shorthand for Debug.Print.) A statement of the form var = value assigns a value to a variable. In Figure D.2, the variable numVar had the value 10 when the program was interrupted. Figure D.2. Three statements executed in the Immediate window.
|