Skip to main content

Jump to Errors

TL;DR Run debuggai jump <error‑id> and we’ll teleport you to the exact line of code (and the docs page that explains the fix) in one hop.

Why you’ll love it ❤️

  • Zero‑friction debugging – no more copy‑pasting stack‑traces into search bars.
  • Context‑aware – pulls the file at the commit that actually failed, even inside Docker or GitHub Codespaces.
  • Bidirectional – works in both directions: from terminal → docs and from the DebuggAI web UI → your editor.

Prerequisites

ToolMinimum versionNotes
debuggai CLI ≥ 0.10.0npm i -g @debuggai/cli or brew install debuggai
Git ≥ 2.25Used to locate the file & commit
Your editorVS Code, JetBrains, or $EDITORWe open a vscode:// or idea:// URI when available

Inside Dev Containers
The command auto‑detects Docker (or Codespaces) and uses the container’s git workspace. Nothing to configure.


Basic Usage

# 1. Copy the short error ID from the stack trace
Error [DG‑4f22e3] in /app/src/server.ts:42 …

# 2. Jump!
debuggai jump DG-4f22e3

The CLI will:

  1. Resolve DG‑4f22e3src/server.ts:42 at commit a1b2c3d.
  2. Open your editor (or browser) at that exact line.
  3. Launch the DebuggAI docs page describing the root‑cause analysis and suggested fix.

Options

FlagDefaultDescription
--editor <cmd>auto‑detectForce an editor command (code, idea, nvim, etc.)
--webfalseSkip the editor and go straight to the docs page
--no-docsfalseOpen the file only, suppress docs

Example:

debuggai jump DG-4f22e3 --editor nvim --no-docs

How It Works 🛠️

  1. Event lookup – We query the DebuggAI API with the error ID to fetch the stack‑trace and commit hash.
  2. Repo sync – If the hash isn’t present locally, the CLI performs a shallow git fetch for just that commit.
  3. Line mapping – Uses source maps (for TS/JS), DWARF (for Go/Rust), or plain paths to compute the precise location.
  4. URI launch
    • If VS Code or JetBrains is running, we emit a vscode://file or idea://open URI.
    • Otherwise we fall back to $EDITOR +{line} {file}.
  5. Docs link – Opens ${WEB_APP_URL}/errors/<error‑id> in your default browser.

Tips & Tricks

  • Keyboard shortcut – Map alias jj='debuggai jump $(pbpaste)' and just copy‑ID → jj.
  • Bulk modedebuggai jump --latest opens the newest error from the current branch.
  • CI use – Add debuggai jump --web DG-<id> to post‑test hooks to attach deep links to Slack alerts.

Troubleshooting 🤔

SymptomResolution
“Cannot find commit”Ensure the repo remote URL matches the one connected to DebuggAI, then git fetch --all.
Opens wrong editorSet DEBUGGAI_EDITOR env var (export DEBUGGAI_EDITOR=code).
URI scheme blockedSome browsers block vscode:// links; copy the fallback command printed to the console.

Next Steps

  • Autofix PRs – Let DebuggAI draft the patch once you land on the faulty line.
  • Live Replay – Capture and replay the exact request that triggered the error.

Have feedback or feature requests? Open an issue on GitHub or drop by our Discord. Happy debugging! 🎉