The debugger Watch tool can also be used to view the value of keyboard-entered expressions. These may be entered by clicking on any cell in the Watch manager's display tree and editing or entering the desired expression in the Variable column. Press enter to complete the editing session.
Only expressions that evaluate to a value may be entered. Other statements, like variable assignments, import statements, and language constructs are rejected with an error. These may only be executed using the Debug Probe.
Expressions are evaluated in the context of the current debug stack frame, so this feature is available only when the debug program has been paused or has stopped at a breakpoint or exception. This also means that the value of the same typed expression may change as you move up and down the call stack in the main debugger window.
In cases where evaluating an expression results in changing the value of local or global variables, your debug program will continue in that changed context. Whenever a value is changed as a result of expression evaluation, the updated value will be propagated into any visible debugger variable display areas because Wing IDE refetches all displayed data values after the evaluation of each expression. However, since you may not notice these changes, caution is required to avoid undesired side-effects in the debug process.
Note that breakpoints are never reached as a result of expression evaluation, and any exceptions encountered are not reported. If you need to debug an expression, use the Debug Probe where exceptions will be reported.