11. Debugging Flashcards
(5 cards)
1
Q
Bug
A
Cause of a problem in a program
2
Q
Debugging
A
Process of troubleshooting bugs
3
Q
Visual Inspection
A
- Basic debugging process
- Looking at each statement one-by-one to try to find a bug.
- For each statement, this process has the hypothesis: This statement has a bug.
- The test is a visual inspection of the statement.
- If a bug is found, the hypothesis is validated. If not, the result in inconclusive (the error has been unnoticed).
4
Q
Debug Output Statement
A
- Output helps determine whether the preceding statement has the bug
5
Q
Hierarchical debugging
A
- For larger programs
- may divide the statements into regions, and insert one debug output statement after each region
- Commonly a programmer strives to find regions of related statements