User`s manual

Dynamic C Users Manual digi.com 257
14.2.6 Inspect Menu
Click the menu title or press <Alt+I> to open the Inspect menu.
The Inspect menu provides commands to manipulate watch
expressions, view disassembled code, and produce hexadeci-
mal memory dumps. The Inspect menu commands and their
functions are described here.
Add Watch
<Ctrl+W>
This command displays the “Add Watch Expression” dialog.
Enter watch expressions with this dialog box.
A watch expression may be any valid C expression, including
assignments, function calls, and preprocessor macros. (Do not
include a semicolon at the end of the expression.) If the watch
expression is successfully compiled, it and its outcome will
appear in the Watches window.
If the cursor in the active window is
positioned over a variable or function
name, that name will appear in the
Watch Expression text box when the
Add Watch Expression dialog box
appears. Clicking the Add button will add the given watch expression to the watch list, and will leave
the Add Watch Expression dialog open so that more watches can be added. Clicking the “OK” button
will add the given watch expression to the watch list, and close the Add Watch Expression dialog.
To add a local variable to the Watch window, the target controllers program counter (PC) must point to
the function where the local variable is defined. If the PC points outside the function, an error message
will display when “Add” or “OK” is pressed, stating that the variable is out of scope or not declared.
An example of the results displayed in the Watches window appears below.
If the evaluation of a watch expression causes a run-time exception, the exception will be ignored and
the value displayed in the Watches window for the watch expression will be undefined.
Starting with Dynamic C 9, structure members are displayed whenever a watch expression is set on a
struct. Prior to Dynamic C 9, separate watch expressions had to be added for each member. Introduced
in Dynamic C 8.01, the Debug Windows tab of the Environment Options menu lets you set flyover hint
evaluation of any expression that can be watched without having to explicitly set the watch expression.
See “Watch” on page 293 and “Watch Window” on page 275 for more details.