Skip to Main Content
Move beyond "guess and check"
The general approach to debugging
- Develop a testable hypothesis
- Test it in the simplest possible case
Questions to ask when developing your hypothesis
- What type of problem do you have?
- What is your goal for the code?
- Does the code have all the necessary steps?
- Does the code need updated since previous uses?
Strategies for your testing
- Keep your goal or goals in mind
- Go line-by-line
- Add comments as you go
- Read the documentation for the functions you are using