DebugAIdocs

How DebugAI works

What happens between an error on your screen and a fix in a diff, and what DebugAI does not do.

DebugAI works in two halves. Before anything breaks, it indexes your project. When something breaks, it reads the error, finds the code that matters, and answers with a root cause and ranked fixes.

Before an error: the index

With the extension signed in, your project is indexed when VS Code starts and again for each file you open or save. The text of each source and config file is sent over HTTPS to DebugAI's servers, up to 50 KB a file and up to 500 files a run. The free plan keeps 200 files per project.

On the server, each file is split into chunks. For Python, JavaScript and TypeScript the chunks follow the code's structure, and Java and C# files are indexed too. Voyage AI turns each chunk into an embedding, a list of numbers that places code with a similar meaning close together. The chunks and their embeddings are stored in your project index, under your account. The index is used only for your own debugs and is never shared with other users.

This is what lets DebugAI find code a stack trace never names. A crash in cart.py can come from a value set in settings.py, and only the index knows settings.py exists. Index your project covers the details and the setting that turns automatic indexing off.

When an error happens: one debug

Nothing is analysed until you ask. The extension keeps the output of the last five terminal commands in memory, and reads it only when you run DebugAI: Analyze Terminal Error.

From the editor, one debug goes like this:

  1. You run DebugAI: Analyze Error (Ctrl Alt D) or DebugAI: Analyze Terminal Error.
  2. The extension takes the error text and up to 30 lines of code either side of your cursor. Error text over 3,000 characters is cut, keeping its start and its end.
  3. It adds a few facts about the project that the error cannot carry: the dependency names and versions your manifests declare, which kinds of manifest exist, the names of your Python modules, whether a virtual environment or node_modules is present, and the Python interpreter VS Code has selected.
  4. All of it goes over HTTPS to the DebugAI API.
  5. The engine embeds the error text with Voyage AI and searches your project index for the code related to it.
  6. The error, your code and the related code go to Claude (Anthropic) for analysis. When Claude is unavailable, the same request goes to OpenAI's GPT-4o-mini.
  7. Where a fix can be checked mechanically, it is, and each fix is labelled with the result. See Verification.
  8. The answer is cached for a short time, so the same request is answered without asking the model twice, then deleted.
  9. You see a root cause and up to three ranked fixes. Nothing is written to a file until you open a fix as a diff and press Apply.

If your project has met the same error before, the analysis is given that history, including any fix reported as failed in the last week, so it is not suggested again. That is error memory.

Which model answers

PlanModel
FreeClaude Haiku 5.5
Pro and TeamClaude Haiku 5.5, with hard errors routed to Claude Sonnet 4.6
Any plan, when Claude is unavailableOpenAI GPT-4o-mini

From an AI agent

The MCP server follows the same path from the API on. What it sends is a little different, because it runs beside your agent instead of inside your editor:

  • It reads up to three source files the stack trace names, only inside the project, and sends the 40 lines either side of the failing line (a short file goes whole). A code snippet the agent passes replaces those reads.
  • It sends the same project facts, without the interpreter path, plus whether a .env file exists. It never opens one.
  • When the agent gives them, it sends the command that reproduces the failure and the output expected once it is fixed. DebugAI never runs that command.

The DebugAI plugin for ChatGPT and Codex is different again. It sees only what each tool call passes in. It cannot read your files or run code, so paste the error and the code around it. See the ChatGPT and Codex quickstart.

What DebugAI does not do

  • It does not do browser or end-to-end testing, and it does not write Playwright or Cypress tests.
  • It does not write tests or run your test suite. It debugs the error a failing test prints.
  • It does not open tunnels to localhost, review pull requests or monitor production.
  • It does not generate applications from scratch.
  • It does not change a file without showing you the change first and waiting for you to accept it.

DebugAI works at development time, on errors that have already happened in your own project.

On this page