Knowing something is broken is easy. Finding out exactly why is the hard part. That's debugging.
A cake came out wrong. Was it the flour, the eggs, the oven or the timing? You could bake it again, tasting at each step, until you find the one that went wrong.
That’s debugging. It’s the detective work of tracking down exactly what’s causing a bug. The fix is often quick. Finding it is the slow part.
How developers do it
- make it happen again: a bug you can repeat is half solved
- narrow it down: which step, which page, which user?
- read the clues: error messages, logs and stack traces
- change one thing at a time: so you know what made the difference
What makes it hard
Some bugs only happen on certain phones, at certain times or for certain people. Those can take days to pin down.
What it isn’t
It isn’t guesswork, at its best. Good debugging is careful and step by step, like a scientist ruling things out.
Where the comparison breaks down
You can only taste a cake so many times. A developer can rerun a program thousands of times, pause it halfway and look inside.
How the words fit together
A bug is the problem. Debugging finds it, using logs and stack traces. A patch fixes it.
Explaining the problem out loud often reveals the answer. Developers even explain bugs to a rubber duck on their desk.

When you'll hear it
“I'm debugging it.” I'm working out what's causing the problem.
“Can you reproduce it?” Can you make it happen again on purpose? That makes debugging much easier.
“Let's rubber-duck it.” Let's explain the problem step by step until the answer jumps out.
“What would help us find the cause faster next time something like this happens?”

Try it yourselfReady to use it? The exact commands are on my other site, devcmds: Watch a log file live ↗


