diagnostic terminal · v2.0

Paste what broke. Get the fix, not a lecture.

DebugAI doesn't run your code — it reads it. Give it what the code was supposed to do, the code itself, and what the console shows. It finds the mismatch between the three.

Debug something See how it works
session.log

How it works

  1. $ describe

    Say what the code was supposed to do, in plain language.

  2. $ paste

    Drop in the function, component, or file that isn't behaving — any language.

  3. $ console

    Add the error if there is one. No error at all works too.

  4. $ diagnose

    Get the bug, why it happens, and a fix you can copy straight into your file.

What it's built for

Reads intent, not just syntax Most linters catch typos. DebugAI catches the gap between what you meant and what you wrote.
Works without a stack trace Silent logic bugs — wrong scope, off-by-one, stale closures — get diagnosed from code and intent alone.
Any language, no setup Paste and go. No install, no linking a repo, no sandboxed execution of your code.
A fix you can copy, not a paragraph to decode Every diagnosis ends in working code, ready to paste back in.

The three things that have to agree

A bug is just a disagreement between three things: what you meant, what you wrote, and what the console says happened. DebugAI's whole job is finding which edge broke. Toggle the code below and watch the triangle react.

? ? ? intent code console
$ scenario

Why var i breaks the loop

It's one of the most common JavaScript bugs there is. Scrub the slider to watch var share one binding across every iteration, while let gives each one its own.

for (let i = 0; i < 3; i++) {
  setTimeout(() => console.log(i), 100);
}
var let
handler[0]→
handler[1]→
handler[2]→
i = 0
i = 1
i = 2

Real diagnoses

variable scope issue — line 1

var i is function-scoped, so every click handler shares the same i — by the time a click happens, the loop has already finished.

1for (let i = 0; i < items.length; i++) {2  items[i].addEventListener("click", ...);3}

missing await — line 2

res.json() returns a Promise. Without await, user is the Promise itself, so user.name is undefined.

1const res = await fetch(url);2const user = await res.json();3nameEl.textContent = user.name;

Beat the diagnostic

Three real bugs, no hints beyond the console. Click the line you think is wrong before reading the fix — most people get one of these three wrong.

Round 1 of 3 Score: 0

$ intent

    
          
        

    try it yourself

    Step 1 of 3

    Describe the behavior you expected, in plain words.

    0 / 4,000

    Ctrl + Enter to continue