Debug by isolating the failure
Debugging is where a lot of people freeze, and it is genuinely the skill that unlocks the rest: once you can reliably solve a bug, you can build almost anything, because every build is just a series of bugs you work through.
The core move is to make the problem smaller. Isolate the smallest piece that is actually failing, rather than waving at the whole app and hoping the AI guesses. The more precisely you can point at what broke, the faster you get a real fix instead of a plausible-sounding wrong one. This is the same isolate-the-variable instinct behind building locally and building the shell first; debugging is just that instinct applied under pressure.
Feed it the real error, not your paraphrase of it. Copy the actual console error, or the logs from a dedicated debug view, and paste them straight into the agent. The exact text carries information your description loses, and it is usually enough on its own to get a correct fix. Keep a debug rule in the project so the AI approaches errors the same disciplined way every time.
When you get truly stuck, change the perspective. Take the same error to a different model. Different models have different strengths and blind spots, and one will often see immediately what another kept missing. It costs you a minute and frequently breaks a stall that would otherwise eat your afternoon.
Worked example. A page renders blank after a change. The panicked move is to tell the agent the whole app is broken and let it thrash across ten files. The disciplined move is to open the console, copy the exact error, and notice it points at a single component reading a value that is briefly undefined. Pasted verbatim, the agent fixes that one component in a minute. The bug that felt like everything was on fire was one line. Most of them are.
Stay calm and stay small. The builders who ship are not the ones who never hit bugs, they are the ones who do not panic at them.