The Debugging Process (cont)
When you run a buggy program, initially everything is ok.
At some point, the buggy statement is executed ...
- the program state changes from valid to incorrect
- but the program won't necessarily crash at this point
The goal: find the point at which the state becomes "corrupted"
- initially you know broadly where the problem is
- then you move to the function where the problem occurs
- the you find the precise statement with the bug
Typically, you need to determine which variables "got the wrong value".
|