DevX Code Debug supports the use of watch variables.
To add a watch expression to a variable, you can use one of the following options:
- Right-click the required variable, and select Add to watch.

- On the WATCH panel, click + and enter the variable name in the Expression to watch field.
When the variable is added, you can set and copy the variable value.
To set the variable value:
- Right-click on the variable and select Set Value. An input field is displayed.
- In the input field, enter the value.
To copy the variable value:
- Right-click on the variable and select Copy Value.
Important
Owing to various limitations of VS Code APIs, the following rules apply when you add watch variables:
- For parent or child variables, you must enter the fully qualified name.
- Only names added by you are displayed in the WATCH panel. The fully qualified name is displayed in the WATCH panel only if you have added the fully qualified name.
For example, if FQName of the variable is xyz.abc.pqr.lmn and you add lmn on the WATCH panel, the fully qualified name is not displayed on the WATCH panel. - When the variable has multiple occurrences in the program:
- If you try to add a single variable to the WATCH panel out of the variable that is present in multiple occurrences by adding just a child name, a list of variables is displayed from which you must select the required variable.
- To watch both the variables with the same name present under different records, you need to add fully qualified names for both variables in the WATCH panel. For watching any one of the two, adding just the child variable name is sufficient.
- When you hover over a variable, details of all its occurrences are displayed.
- If you add an incomplete or invalid variable, it is added to the WATCH panel, but the value appears as not available and an error message is displayed.