Coding with AI tools

Stage 6 · Lesson 1 of 6

Reproduce, then shrink the problem

Debugging with AI

Before asking anyone, human or AI, to fix a bug, find the exact steps, input and environment that make it happen every time. A reliable reproduction, or , turns "it sometimes breaks" into a failing test, and without one nobody can prove a fix worked.

Then shrink it: remove everything unrelated until you have the smallest code and data that still show the bug, a . Shrinking often reveals the cause by itself, and a small repro fits in the without noise. For intermittent bugs, note what varies: timing, data, order, environment.

Common trappasting "it doesn't work" with a screenshot, getting back a confident guess, and applying it without knowing whether it fixed anything.

A question to check yourself, an AI practice session and 2 cheat sheet entries come when you add the roadmap to your account. Add it

Resources for this stage

Start with

Keep handy

Also worth your time

Mark this stage as not done?