4.13 Watching Symbol Values Change
Watch the values of global symbols or SFRs change in the Watches window. Determining if these values are as expected during program execution will help you to debug your code.
For more on this window, see 14.30 Watches Window.
Create a New Watch
Click the Finish Debugger Session icon
. Then remove the breakpoint from the previous discussion by clicking in the left margin.To create a new watch:
- Select New Watch dialog will open. . The
- Enter a Watch expression, in this
case
PORTC.IN
, and then click OK. The Watches window will now appear on the desktop with the symbol.
View Value Changes in Watches Window
Click the Debug Project icon
to begin code execution. Halt the execution by clicking the Pause icon . Click on the Watches tab to see the value ofPORTC.IN
after port initialization.
Click the Continue icon
. This time press and hold the button on the evaluation board and then click the Pause icon. View the Watches window to see that the value has changed.Click the Finish Debugger Session icon
.