Stage 6 of 10 · 6 lessons · ~2 weeks
Debugging with AI
Use AI to find causes rather than hide symptoms: reproduce first, shrink the problem, give full evidence, test hypotheses, fix the root cause with a regression test and keep using the real debugger.
Start: Reproduce, then shrink the problemLessons· one lesson for each topic, in this order
Do this
- Reproduce a bug reliably before asking for help.
- Shrink one bug to a minimal example.
- Ask for ranked hypotheses and test at least two before changing code.
- Reject one symptom patch and find the root cause instead.
- Fix a bug using breakpoints in your editor's debugger.
- Keep a regression test and a two-line note for every bug you fix.
Start with
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT's free lecture on debugging and profiling covers logging, debuggers and tools you will use for years
Keep handy
Also worth your time
Before moving on: Three real bugs fixed with your tool where you reproduced first, tested hypotheses, found the root cause with evidence, used the debugger at least once, and left a regression test and a short note for each.

Try Debug mode on a bug you can reproduce but cannot explain: it forms hypotheses, instruments the code and asks you to reproduce, which is exactly the method this stage teaches. Read its hypotheses before its fix, and check it removed every log line afterwards.