Skip to content

· 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.

Rounds alternate between Python and JavaScript, so you also learn where the two languages differ: integer division, truthy values, list and array methods, and how each one treats text and numbers. Short snippets keep the focus on reading, the skill that matters most when you debug someone else's code.

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.

Scoring

Each right answer scores 100 points, plus up to 50 for answering fast and up to 50 for a streak (10 for every right answer in a row, up to five).

A wrong answer or a timeout costs one of your 3 lives. Your best score is kept in this browser.

What it trains

Code reading
Following a short snippet line by line.
Debugging
Off-by-one errors, wrong comparisons and typos.
Speed
Less time per snippet as you go.

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.

Spotting a bug quickly is also a good way to learn a language: each fix shows a rule you will not forget, because you saw what breaks when it's ignored.

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.

How long is a round?

Each snippet has a short timer, and a run is a series of snippets. Most runs take three to five minutes.

Can I play on a phone?

Yes. The snippets are short and wrap to fit, and you tap the line you think is wrong.