Debugging Flashcards
1
Q
What are the 2 key issues in debugging?
A
Understanding why the program misbehaves and correcting the behaviour
2
Q
What are bad ways to debug?
A
Blame computer
Random Changes
Random Search
Stack Overflow
3
Q
Good debugging involves _______
A
investigation
4
Q
What are the steps in understanding a bug?
A
Forego assumptions Reproduce the bug Ask why the code produced the wrong behavior Rank the hypotheses Try to disprove each hypothesis
5
Q
What are some basic commands for exploring code in debuggers?
A
Running Breakpoints Stepping Continuing Backtraces
6
Q
What are some basic commands for investigating code in debuggers?
A
Printing state
Calling functions
Changing state and continuing
Watchpoints
7
Q
Why is Record and Replay debugging so powerful?
A
Allows a deterministic replay of the same execution
Trace can be shared across computers