DEV Community

Parth Ingle
Parth Ingle

Posted on

👻 I Built Bug Exorcist: An AI Debugging Agent That Exorcises Bugs Locally with Gemma

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

👻 Bug Exorcist — Cast out bugs. Bring your code back to life.

We've all experienced it: you're working on a project, everything seems fine, and suddenly your terminal throws an error that makes absolutely no sense.

You inspect multiple files, read stack traces, try different solutions, and somehow end up with even more bugs.

That's what inspired me to build Bug Exorcist, a local-first AI debugging assistant powered by Google's open-weight Gemma model.

Instead of simply explaining an error message, Bug Exorcist aims to investigate the actual project, identify relevant source files, understand the error context, and suggest possible fixes.

Here's how it works:
👻 Summon Your Project: Upload a project ZIP file and let Bug Exorcist inspect its structure.

🔍 Identify the Possession: Submit an error message, traceback, or stack trace.

🧠 Investigate the Bug: Gemma analyzes the relevant code and debugging context.

🪄 Perform the Exorcism: Receive a root-cause explanation and suggested code correction.

The initial version focuses on Python, JavaScript, and TypeScript projects.

The idea is simple: developers shouldn't just receive an explanation of an error. They should be able to understand where it originated and how to fix it.

Demo

Bug Exorcist is designed as a locally running application rather than a hosted AI service.

Code

👨‍💻 GitHub Repository: GITHUB REPOSITORY
The project uses a React frontend and a Python FastAPI backend, with Ollama providing local access to Gemma.

Contributions, feedback, and suggestions are welcome!

How I Built It

The central part of Bug Exorcist is Gemma running locally through Ollama.

I wanted to build something where open-weight AI wasn't simply an additional feature but the technology that made the application possible.

Here's the technology stack:

Component

Technology

Frontend

React + Vite

Backend

Python + FastAPI

AI Model

Google Gemma 3 1B

Model Runtime

Ollama

Storage

Local project files

The debugging workflow follows a straightforward pipeline:

The developer uploads a project ZIP file.

The backend extracts and inspects the project structure.

The application detects supported programming languages and processes the submitted error.

Relevant source-code context is collected.

The context is sent to Gemma through the local Ollama runtime.

Gemma generates a structured diagnosis with a likely root cause and suggested correction.

The frontend displays the investigation results.

I'm also working towards adding a proper evidence board, code-diff preview, patch approval, and automated verification.

The intention is to make Bug Exorcist an actual debugging companion rather than another chatbot with a fancy interface.

Why Does Open Innovation Matter?

For me, this is the most important part of Bug Exorcist.

Developers frequently work with private repositories, personal projects, credentials, and proprietary code. Sending that information to an external AI service isn't always desirable.

By using an open-weight model with local inference, Bug Exorcist explores a different approach.

  1. Privacy and control

The application communicates with a locally running model. Repository contents and debugging prompts don't need to be sent to a hosted AI API.

  1. Offline capability

Once the model and application dependencies have been downloaded, the core AI workflow can operate without an internet connection.

  1. Freedom to experiment

Developers can experiment with different compatible open-weight models without rebuilding the entire application around a proprietary AI provider.

  1. Accessibility

Local inference avoids per-request charges from hosted AI APIs. Developers can experiment without depending on an external inference service, although they still need suitable hardware to run the model.

I believe open innovation makes AI more accessible and gives developers greater control over how their tools work.

For Bug Exorcist, that means debugging your own codebase with an AI model running on your own machine.

The Spirit of It

Every developer has encountered a bug that seems impossible to explain.

Sometimes it's a missing dependency. Sometimes it's an incorrectly initialized variable. And sometimes it's something hidden deep inside the codebase.

I thought it would be fun to imagine these bugs as ghosts haunting our projects.

Instead of another horror-themed chatbot, I wanted to give those ghosts a purpose: make them visible, investigate them, and help developers send them away.

That's the spirit behind Bug Exorcist.

Because sometimes, debugging feels less like programming and more like performing an exorcism. 😄

Cast out bugs. Bring your code back to life. 👻

Prize Categories

Gemma — Best Use of Gemma: Bug Exorcist uses Google's open-weight Gemma model as its local AI debugging engine through Ollama.

Top comments (0)