· Skillz · Python & JavaScript
Bug Hunt: free debugging game for Python and JavaScript
A few lines of Python or JavaScript, one bug. Find the broken line before the clock runs out, then learn the fix.
What is Bug Hunt?
Express debugging: every snippet says what it should do, and exactly one line breaks it. Off-by-ones, = instead of ===, a missing await, text added to numbers… Tap the culprit before time runs out.
Bug Hunt trains the reflex every developer needs: reading a few lines of code and spotting what breaks them. Each snippet comes with what it should do and an example. Exactly one line is wrong; tap it before the clock runs out.
The bugs are the classics that cost real hours: off-by-one ranges, = instead of ===, floor division, text concatenated to numbers, a fetch without await, a mutable default argument, sort() on numbers. After each round you see the fixed line and why it breaks.
At a glance
- Category
- Skillz
- Difficulty
- Medium
- Play time
- 4–6 min
- Price
- Free, in your browser, sign-up optional
How to play
- Read
- The goal says what the code should do, with an example.
- Spot
- Tap the one line that breaks it. Only one line needs fixing.
- Race
- Faster answers and streaks score more. A wrong line costs a life.
- Learn
- Each round shows the fixed line and the bug pattern behind it.
Strategy and tips
- Run the example
- Mentally run the example from the goal through each line. The bug is where the value goes wrong.
- Check the boundaries
- <= vs <, range(n) vs range(1, n + 1): limits are where most bugs hide.
- Watch the types
- Form input is text: "20" + 5 is "205" in JavaScript.
- Async needs await
- A fetch without await gives a Promise, not a response.
- Spot copy-paste
- Two similar lines where one variable didn't get renamed is a classic.
Why play Bug Hunt?
Most debugging is pattern recognition. Bug Hunt shows the patterns that come up again and again, so you recognise them in your own code in seconds instead of minutes.
Frequently asked questions
Is Bug Hunt free?
Yes. It is free and runs in your browser, with no download. Signing up is optional.
Do I need to know how to code?
A little helps. The goals explain what each snippet should do, and every answer is explained, so beginners learn fast.
Which languages are used?
Python 3 and modern JavaScript, about half each.
Is there always exactly one bug?
Yes: one line needs fixing, and the other lines are correct.