## Editing Expressions

Use the Edit Watch Expression dialog to change a previously defined expression. Right-click in the Expressions view and select the Edit Watch Expression... command from the context menu. When editing an expression, the same rules used to create it apply. Mainly, the edited expression must be a valid C/C++ expression that evaluates to a value and does not call a function nor execute code.

Use the Enable control to set whether this expression should be automatically evaluated during a debug session.

Figure 1. Edit Watch Expression dialog

You can enter any valid C/C++ expression, for example:

> 2 + 2
> myVariable + 8
> &myVariable
> myClass.myMemberVar
> etc.

are all valid expressions that the Expressions view can monitor and display. However, an expression cannot call a function or execute code. The following example will not work:

> std:strlen("Hello");

##### Other references

- Variables and Expressions Overview