The Immediate window enables you to run a line of code by typing or pasting it into the window and then pressing ENTER. This is helpful when you debug an application and want to execute individual procedures or evaluate expressions.
You can evaluate expressions by printing their values in the Immediate window. Since Visual Basic for Windows CE has no Debug object, the special command ? has been added to the debugger to print variable values to the Immediate window. Do not use the Print command, as it attempts to invoke the Print method of the active form.
The Immediate window executes statements in the context or scope of the procedure selected in the CallStack window. For example, if you type ? variablename, the output is the value of that local variable. Errors caused by commands sent from the Immediate window affect the application you are debugging. For example, if a variable is out of scope, the application's Err object is loaded with an error indicating that the variable is undefined. In addition, the procedures you execute from the Immediate window are executed in the scope of the selected CallStack window procedure.