User manual

UM0036 STM8 C tutorial
Doc ID 7705 Rev 11 359/385
Figure 290. Memory and Watch windows
6. In the Editor window, locate the bugCountDown variable, select it and drag and drop it
to the Watch window.
7. In the Editor window, locate the enableBug variable, select it and drag and drop it to
the Watch window.
8. In the Watch window, double-click in the Value field of the enableBug variable and
enter 1 at the flashing cursor. The bug is now enabled and the bug countdown begins.
9. In the Watch window watch the value of bugCountDown decrease, after it has reached
0 the variable nbOfTransitions is overwritten—we have a bug! This is described in
more detail in the next procedure.
Figure 291. Evolution of variables in Watch window
10. Stop the program by selecting Debug>Stop Program.