Vibe Coder · Unit 8: Building With Claude Code · Lesson 7 of 15

Fixing bugs

A bug is normal. How to describe it so it can be fixed: what you did, what you expected, what happened, and the exact error.

Read the short notes and pictures.Do everything inside a blue frame.

Describing a problem well

Agents fix bugs quickly when they know exactly what is wrong. "It is broken" starts a guessing game. A short report with the steps, the expectation, the result and the error usually gets a correct fix first time.

A 3D scene of coloured blocks and cards. Say three things: what you did, what you expected, what happened.
What you did, what you expected, what happened.

A good bug report

Vague

The invoice page is broken.

Clear

On the new invoice page I typed 300 in Amount
and pressed Send. I expected to see the invoice
in the list. Instead the page went blank.
The browser console shows:
TypeError: cannot read properties of undefined
Steps, expectation, result, error.
A 3D scene of coloured blocks and cards. Copy the exact error: TypeError: cannot read, properties of undefined (reading ’total’).
Copy the exact error message.

When the fix does not work

  1. Say so plainly

    "Still happening, same error."

  2. Ask for the cause first

    "Before changing anything, explain why this happens."

  3. Go back if needed

    Return to the last working commit and try a different approach.

ActivityBuild stepThe first working version

Fix a real bug

Find something in your app that does not work as the brief says. Write a four-part report, let Claude Code fix it, test it yourself, and commit.

Done when

Keep a short list of bugs in "My build" and clear it before each milestone.

Keep these

  • Report what you did, expected and saw.
  • Paste the exact error.
  • Fix one thing at a time and test.