
The Watches panel enables you to create and display a list of watch expressions, allowing you to keep track of variable/expression values as you single-step debug the source code of an embedded software project. |
The panel lists, for each watch that is added, the Expression (what to watch for) and the Value (the evaluation of the expression at the current line in the source code).
A small icon to the left of the watch expression is used to indicate the status of the watch:
|
- |
Source code execution has entered a function or procedure where the watch expression is valid (i.e. variable(s) in the watch expression are defined and used in the function or procedure) |
|
- |
Source code execution has entered a function or procedure where the watch expression is invalid (i.e. variable(s) in the watch expression are not defined and used anywhere in the function or procedure). This state will also arise if the expression defined for the watch is not valid |
|
- |
Watch is disabled |
As you step through the lines of code in the source document, the watch expressions will be evaluated and the corresponding values updated.
The right-click pop-up menu for the panel provides the following commands:
Define the required expression that you wish to monitor. For example, the expression could be a particular variable that is used in the code (e.g. OUT, a, Remainder), or an expression based on one or more defined variables (e.g. OUT=OUT+Remainder). Clicking OK will add the new watch to the panel, at the bottom of the list