By the end of this lesson you will make a bug happen on purpose, shrink it to the smallest case, and find the logs that explain it, on your laptop and online.
You need: a web app you are building with a coding agent, running with npm run dev · Time: 8 minutes
Reproducing a bug means making it happen again, on purpose, by following the same steps. If you can't make it happen, nobody can check whether a fix worked, not you and not the AI.
Write the steps as a numbered list, as if for a friend who has never seen your app:
- Open
http://localhost:3000/login. - Type the phone number
9876543210. - Tap Send OTP.
- Expected: the OTP screen opens. Actual: the spinner turns forever.
Then try the steps three times and note: does it happen every time? "Every time" is the best news: easy to test. "Sometimes" is a clue too: it often points to timing, slow internet or particular data.
Why?A bug you can repeat is a bug you can fix. The same steps become the test that proves the fix worked.
- Open
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Shrink the bug
- Two kinds of logs
- Add temporary debug logs
- Logs after you go live
- Recap