Every coder hits bugs — even the pros. Today you'll learn to spot them, describe them, and fix them.
Below are 5 tiny broken code examples (illustrative, not a live tool). For each one, guess what's wrong before checking the answer.
Notice that most bugs are small — a mismatched tag, a missing mark, or code that doesn't match what it's supposed to do. Spotting them gets easier with practice.
A bug is a small mistake in code that makes it not do what you wanted. Bugs are a completely normal part of coding — even professional programmers create them constantly. Finding one isn't a sign you did something wrong; it's just part of the process.
Two habits make fixing bugs go much smoother. First, describe the problem clearly to your AI tool: what you expected to happen, and what actually happened instead — the same specific thinking you used for prompts back in Lesson 4. Second, after AI gives you a fix, test it to make sure it actually works, and try to understand why it worked instead of just copying it in.
Debugging is often a few rounds, not just one try. If a fix doesn't quite work, that's normal too — just describe what's different now and try again.
This activity happens in your own code generation tool — not on this page.
Want to plan your bug report first? Draft it here.
Saved right in this browser, on this device — it's just for planning, and never sent anywhere.
Just like in Lesson 8, running or testing any code — fixed or not — should always be done with a grown-up present.
Think about the Bug Hunt game or your own fix — what was the bug, and how did you (or would you) describe it to get a useful fix?
This is saved right in this browser, on this device — it's never sent anywhere.
10 questions, picked at random from a bigger question bank — so if you take it again, you'll likely see a different mix. Let's go!
Privacy, spotting fakes, and using AI honestly.