Intro to Debugging Flashcards

1
Q

Debugging

A

The process of identifying and removing errors from computer hardware or software

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

The model of “What, Why, How” to debug

A

When we encounter a bug, debugging should be our way of asking and answering the following questions, typically in this order:

1) What is happening? What did we expect to happen? What actually happened?
2) Why is this happening? What line(s) of code are making this happen?
3) How do we fix it? What do we need to change, add, or delete about our existing code?
* *Come up with a theory of what is happening and why it’s happening
* *Test your theory by trying one approach to fix it!
* *Document what you tried and what the results were… Probably on a piece of paper or a separate file.
* *Repeat this process until the bug is fixed!

If we approach debugging as a way to ask and answer questions, it’ll make it smoother for us to work through, and easier for others to help us.

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