Program 02 · Module 03 of 9
Module 03: Debugging and Root-Cause Analysis
Find faults with evidence instead of guesses. You reproduce a failure, narrow it with experiments and history, and test hypotheses an assistant proposes before you act on any of them.
- Suggested study time
- 6–7 hours
- Prerequisites
- Module 1.; Ability to run the application and its tests locally.
Sign in to track your progress. Every lesson stays free to read without an account.
Learning outcomes
By the end of this module you will be able to:
- Reproduce a failure reliably and capture a minimal case.
- Form hypotheses and design the cheapest experiment that tests each.
- Use logs, history and bisection to locate where behaviour changed.
- Give an assistant the right evidence and treat its diagnosis as a hypothesis.
- Confirm a fix with a regression test and state the root cause plainly.
Lessons
- 3.1
Reproducing a Failure
Turn a vague report into a reliable, minimal reproduction before touching any code.
40 min - 3.2
Hypotheses and Experiments
Work from evidence to a ranked list of explanations, and test each with the cheapest experiment.
45 min - 3.3
Using History and Bisection
Find the change that introduced a defect with git history and bisection.
40 min - 3.4
Debugging with an AI Assistant
Give an assistant the evidence it needs, and verify its diagnosis before acting.
45 min - 3.5
Fixing and Proving the Fix
Write a regression test that fails first, fix the cause, and write up the root cause.
40 min
About 3 h 30 min of lessons in total.
Practical assignment
Diagnose and fix one defect
Take a real or seeded defect in a repository you are working with. Show how you reproduced it, what you ruled out, and how you proved the fix.
Deliverables
- A minimal reproduction with its steps and expected and actual results.
- A hypothesis log: each explanation, the experiment, and the outcome.
- A failing-then-passing regression test.
- A short root-cause write-up that separates cause, trigger and fix.
Validation checklist
Use this to check your assignment before you move on.
Knowledge check
Show the answer and explanation
Answer: B. Without the code, the claim is a guess, so test it. Adding a null check hides rather than diagnoses. Asking the assistant to choose repeats the guess.
Show the answer and explanation
Answer: A. A test that never failed has not been shown to detect the problem. 'Always start red' is a slogan, not the reason. It does not speed anything up.
PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.