Debugging Flashcards

1
Q

What are the 2 key issues in debugging?

A

Understanding why the program misbehaves and correcting the behaviour

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

What are bad ways to debug?

A

Blame computer
Random Changes
Random Search
Stack Overflow

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

Good debugging involves _______

A

investigation

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

What are some basic commands for exploring code in debuggers?

A
Running
Breakpoints
Stepping
Continuing
Backtraces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some basic commands for investigating code in debuggers?

A

Printing state
Calling functions
Changing state and continuing
Watchpoints

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

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