11. Debugging Flashcards

(5 cards)

1
Q

Bug

A

Cause of a problem in a program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Debugging

A

Process of troubleshooting bugs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Debug Output Statement

A
  • Output helps determine whether the preceding statement has the bug
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly