A developer is debugging a program that produces incorrect output. The developer sets a breakpoint on a specific line of code and runs the program in a debugger. When execution stops at the breakpoint, the developer examines the values of variables at that point. What debugging technique is being used?
Trap 1: Logging
Logging writes messages to a log file, not breakpoints.
Trap 2: Unit testing
Unit testing is automated testing, not a debugging technique.
Trap 3: Code review
Code review is a manual inspection by peers.
- A
Step-through execution
Step-through execution allows stepping line by line, often combined with breakpoints.
- B
Logging
Why it fails: Logging writes messages to a log file, not breakpoints.
- C
Unit testing
Why it fails: Unit testing is automated testing, not a debugging technique.
- D
Code review
Why it fails: Code review is a manual inspection by peers.