Free debugging practice · Python & JavaScript
Get good at finding real bugs
Debugging is what you do most days as a developer, and almost nobody teaches it. BugHunt gives you working code with one real bug in it — you find it, fix it, and learn the pattern behind it.
No signup needed to try one · nothing to install
Real bugs, not puzzles
Every challenge is ordinary working code with one thing wrong: a wrong operator, a missing guard, a loop that never ends. The kind you meet on a Tuesday afternoon, not the kind invented for an exam.
Runs in your browser
Python runs through WebAssembly and JavaScript in a sandboxed worker, right in the tab. Nothing to install, nothing to configure, and no server ever executes your code.
You learn the pattern
Fixing one bug is worth little on its own. Every solve ends with an explanation of why that class of bug happens and how to recognise it, so the next one takes seconds instead of an hour.
Why practise debugging at all?
University courses and coding sites almost all work the same way: here is a blank editor, write a function that passes these tests. That teaches you to produce code.
Professional work is mostly the opposite. You open a codebase you did not write, something is behaving oddly, and your job is to form a theory, test it, and narrow it down. That is a separate skill, and it is trained by doing it — not by writing more greenfield code.
BugHunt exists to give you the reps: read unfamiliar code, spot what is wrong, and build the pattern library that makes it fast.
How it works
Three steps, and none of them are “write this function from scratch”.
Read the symptom
You get the code and a description of what goes wrong — never where the bug is. Exactly like a real bug report.
Find it and fix it
Edit in a real editor and run against real test cases. Stuck? Three progressive hints, only if you ask.
Learn the pattern
Once it passes, read why the bug happens, and compare your fix against a reference solution.
Try one right now
This function should add up every number from 1 to n. Can you see what is wrong before you scroll past it?
def sum_range(n):
total = 0
for i in range(1, n):
total += i
return totalWhat goes wrong: sum_range(5) returns 10, but 1+2+3+4+5 is 15.
Show the answer
range(1, n) stops before n, so the last number is never added. It needs range(1, n + 1). Once you have been caught by an exclusive upper bound once, you spot it everywhere.
Every challenge works like this, except you fix it in a real editor and run it against test cases until they pass.
The bugs you will actually hit
Sorted by the pattern behind them, so you can drill the ones that keep catching you out.
Who it's for
CS students
Your course grades you on code that works. Nobody grades you on finding out why code doesn't — which is most of the job.
Interview prep
Plenty of sites drill algorithms. Almost none drill reading unfamiliar code under time pressure and working out what is wrong with it.
Self-taught developers
Tutorials show you working code. They rarely show you broken code, which is what you actually spend your days looking at.
Anyone changing language
Most bugs are language-specific traps. Mutable default arguments, lexicographic sorting, block scope — learn them deliberately rather than by losing an afternoon.
Common questions
Is it really free?
Yes, with no account required to try a challenge. Your code runs in your own browser rather than on our servers, so there is nothing for us to pay for per user and no reason to put a limit on it.
Which languages are supported?
Python and JavaScript. Both run natively in the browser — Python via WebAssembly. Compiled languages like Java and C++ would need server-side execution, which is what makes other platforms expensive to run.
Do I need to install anything?
No. There is no setup, no local environment, and no extension. Open a challenge and start editing.
What if I get stuck?
Each challenge has three hints that unlock in order: a nudge, then the region of code, then nearly the answer. They are optional, and your dashboard tracks how many you used so you can watch that number fall over time.
What happens to my code?
It stays in your browser. Execution happens locally in a sandboxed worker, and we only store your submission if you are signed in and want your progress tracked.
Find your first bug in the next five minutes
No install, no setup, no account needed to start. Pick a challenge and see how fast you spot it.