An interactive debugging session

We have selected variables a, b and c for watching. This can be done by typing their names in the watch window or dragging the names from the code window. Note each variable is an integer with a default value of zero.
We clicked on the single step button (), and the first instruction of the sub program executed. The variable a was assigned a value of 3. The value is shown in red, indicating that it was changed by the previous instruction.
We clicked the single-step button again, and the next instruction assigned the value 4 to the variable b.
The next instruction assigned the value 5 to the variable c.
The next instruction assigned the value 9 to the variable a.
When we reached the end of the sub program, the variable a had a value of -1.

Note that you can also see the values of variables by moving the cursor over them in the Code window.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.