DEV Community

Prajan Kumar S
Prajan Kumar S

Posted on

DebugBuddy: an AI mentor that teaches beginners to fix their own bugs

Hacktoberfest: Maintainer Spotlight

The problem

As first-year students, we kept seeing the same thing: a classmate hits a cryptic error, panics, pastes it into a chatbot, copies the fix, and moves on. The bug is gone in seconds, but nothing was learned.

We built DebugBuddy at Hacktoberfest Hack Day Coimbatore (hosted by INIT Club and iDEA Club at Amrita Vishwa Vidyapeetham, with Major League Hacking) to change that.

What DebugBuddy does

You paste your code and the error message. Instead of rewriting your code, DebugBuddy:

  • explains what went wrong in plain language and points to the exact line
  • gives 3 progressive hints in Learn mode, revealed one at a time
  • shows the full fix only if you ask for it (Fix mode)
  • teaches the concept behind the mistake with a tiny example
  • explains in English, Tamil, Malayalam, or Hindi
  • adapts to your level (complete beginner or knows the basics)
  • creates a practice problem with the same kind of bug
  • tracks which mistakes you make most often

How it works

The app is built with Python and Streamlit. A backend function sends your numbered code, the error, your level, and your chosen language to an open-weight model (gpt-oss-120b through the Groq API). The model returns structured JSON with the error type, line number, explanation, three hints, fix, and concept.

A few decisions that mattered:

  • The fix is removed in code in Learn mode. We didn't trust the prompt alone to hold it back.
  • Line numbers are added before the code is sent. Without them, models often point at the wrong line.
  • The explanation only describes the problem. Our first version leaked the fix in the explanation, so we changed the prompt.
  • Auto-run mode is local only. We built a mode that runs your Python code and finds the error itself, but we switched it off on the public demo because running strangers' code on a shared server isn't safe.

What we learned

  • Getting an LLM to return clean JSON every time takes careful prompting and safe fallbacks.
  • Small details, like numbering the lines, change the quality a lot.
  • Keeping API keys out of the repo and using deployment secrets is a habit worth building early.
  • Working as a team of four goes better when everyone owns different files.

Try it

It's open source under the MIT license, and contributions are welcome. We'd love to see more languages and more example errors.

A note on AI use

AI is the core of the product, and we also used an AI assistant (Claude) for guidance and code help while building it. We wrote up that disclosure in our submission as well.

Built by Team MutantX: Prajan Kumar S, Rathish, Lalith Sudharsan M M, and Dharuneashwar E.

Built during Hacktoberfest Hack Day Coimbatore.

Top comments (0)