4.12 Viewing Variable Values
You can view the changing values of variables in the Variables window. For more information on this window, see 5.19 Watch Local Variable Values Change.
To see different values of the variable counter
, remove the breakpoint
set in the previous topics by clicking on it in the left margin. Then set a new
breakpoint as shown in the figure below.
Click the Debug Project icon
. When the code starts to run, quickly press and release the button on the evaluation board. The code will halt at the new breakpoint.Open the Variables window by selecting . To view the variable counter
in the
Variables window, click on the Show
Variables button (see figure below).
counter
information will be shown in the Variables
window but may also be seen by hovering over the variable in code.
Click the Continue icon
to continue code execution. Press and release the button on the evaluation board a bit slower. When the breakpoint halts the code again, view the Variables window to see that the value has changed (red text).