Common Bugs with Debugging (Yes, Really)

πŸ“Œ Common bugs Β· debugging✍️ Written by Mark SullivanπŸ“… Reviewed 2026-04-23⏱ ~7 min read

Meta-bugs: things beginners do while debugging that make debugging harder.

Bee mascot
From Bee: "I see this exact bug in beginners every week. Read it once, and you'll spot it on yourself before it bites."
#1

Changing two things at once

txt
Bug. Add try/catch + change algorithm. Now works. Why? No idea.
⚠️
Why this happens
You can't tell which change fixed it. The other change might be hiding a different bug.
βœ…
The fix
Change one thing at a time. Test. Then change the next.
#2

Skipping the error message

txt
"It just doesn't work" β€” without quoting the actual error.
⚠️
Why this happens
The error often spells out the answer. Beginners panic and don't read it.
βœ…
The fix
Read the LAST line first (the actual error), then walk up the stack trace for context.
#3

Modifying production data while debugging

txt
console-edit a record on prod to "see what happens"
⚠️
Why this happens
Now your data is wrong AND you've lost the ability to reproduce the bug.
βœ…
The fix
Reproduce locally first. Touch prod data only with intent and a backup.
#4

Forgetting to remove print statements

js
console.log("DEBUG", user);
// ships to production
⚠️
Why this happens
Logs leak data and clutter logs in prod.
βœ…
The fix
Use a logger with levels (debug/info/warn) and disable debug in prod. Or grep before commit.
#5

Believing "it works on my machine"

txt
Local: works. CI: fails. "Must be CI's fault."
⚠️
Why this happens
Usually a difference in env vars, file paths, locale, dependency versions, or DB seed data.
βœ…
The fix
Reproduce in a clean container. The difference between "works locally" and "fails in CI" is real configuration.
πŸ’‘
Want the full lesson?

Read Debugging β€” the complete lesson, or test yourself with the quiz.

M
Mark Sullivan
Lead writer Β· 8 yrs full-stack

Mark started coding in 2017 after switching from financial analysis. She's built production systems in Python (Django) and JavaScript (Node + React) at two startups, and has taught intro programming at his local community college since 2022. He owns the curriculum for variables, functions, conditionals, and loops on this site. More about Mark β†’