Bug hunt

About

Free demo: level 1 (6 bugs). Levels 2 to 5 (logic bugs, tricky data, Arduino and Pico hardware bugs, and the nasty ones) are in the full version.

About Bug hunt

Real bug reports, real broken code, and a clock. Find the bug, fix it, and prove it with the tests: Python, Arduino C++ and Raspberry Pi Pico MicroPython.

How to play

  • Read the bug report. Someone's code is broken. They tell you what goes wrong, and It should says exactly what the fixed code must do.
  • Run it with ▶ Run to see the bug for yourself. Python bugs show what the program prints. Arduino and Pico bugs run on a pre-wired kit: LEDs, buttons, a knob, a buzzer, a servo, an LCD and sensors.
  • Fix it and press ✓ Test my fix. The tests run your code (on a fresh board for hardware bugs) and show what passed, what was expected and what your code gave.
  • Earn up to three stars: one for squashing the bug, one for beating the clock (the clock starts when you start typing or press Run, and each clue costs 30 seconds), and one for a clean fix that changes no more lines than needed. Real programmers fix the bug, not the whole program.
  • Learn why. Every squashed bug explains what went wrong, so you'll spot it next time in your own code.
  • Your code and stars are saved in this browser.

The levels

  1. Typos and slips: missing colons, misspelt names, indentation and the other mistakes everyone makes.
  2. Logic bugs: the code runs without errors but gives the wrong answer: off-by-one, wrong comparisons, and/or mix-ups.
  3. Tricky data: lists, strings and decimals that don't behave the way you expect.
  4. Hardware bugs: Arduino and Pico code that compiles fine but the circuit misbehaves: floating inputs, missing pinMode, PWM ranges, wrong units.
  5. Nasty bugs: switch bounce in interrupts, integer overflow, variables that wrap round, and the Python traps that catch professionals.

How accurate is it?

Python runs on an interpreter in your browser that follows Python 3.13, with the same error messages. Arduino code runs on the same engine as our Arduino Uno simulator (a 16-bit int, real PWM pins, the internal pull-up, button contact bounce), and Pico code runs on the MicroPython model from our Microcontroller coder, including what really happens when an interrupt handler raises an error. Every bug in the game was tested: the broken code fails its tests and the fix passes.