Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>AI Stack Trace Triage — Diagnose Errors with OpenRouterNew to Visual Studio Code? Get it now.
AI Stack Trace Triage — Diagnose Errors with OpenRouter

AI Stack Trace Triage — Diagnose Errors with OpenRouter

Ciro Cesar Maciel

|
5 installs
| (0) | Free
Paste a stack trace, get the root cause. The AI agent opens the actual files in the frames before diagnosing — Node, Python, Java, Go, Rust, Ruby. OpenRouter (GPT-5, Claude, Gemini). Pay-per-token.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Stack Trace Triage for VS Code

AI Stack Trace Triage for VS Code

Paste a stack trace, get a real diagnosis — grounded in the actual code on your disk. Powered by any model on OpenRouter (GPT-5, Claude Sonnet, Gemini, DeepSeek, and 350+ more).

Built by Ciro Cesar Maciel — because pasting errors into ChatGPT and re-pasting code is slow.

Marketplace version Installs Rating OpenRouter


Stack Trace Triage turns the "copy-paste error into ChatGPT, re-paste relevant files, hope" loop into one keybind.

You select an error or stack trace, hit Cmd+Alt+T — the extension parses the frames, opens the actual files at the line numbers from the trace, sends the surrounding source code along with the error to an LLM on OpenRouter, and shows you a diagnosis with a fix.

Because it reads your real code, the diagnosis is grounded in what actually exists — not what the model guesses your code might look like.

What it does

  • Parses stack traces from Node/V8, Python, Java/Kotlin/Scala, Go, Rust, Ruby, PHP, and a generic fallback for anything that looks like path:line[:col].
  • Resolves each frame against your workspace — absolute paths, relative paths, and basename-search fallback for when the path doesn't match (e.g. compiled output pointing at sources).
  • Reads the top-N frames' source from disk with a configurable window of surrounding lines.
  • Triages the whole thing through the model you picked on OpenRouter.
  • Renders the diagnosis as Markdown, side-by-side with your code.

Why I built this

Every error message looks scary. Most are trivial — once you read three lines of context. The problem isn't the AI, it's the workflow: pasting the trace, then alt-tabbing to find each file, then copy-pasting code, then re-prompting. This extension does that loop for you.

Setup

  1. Install the extension.
  2. Get an OpenRouter API key (sk-or-...). Pay-per-token, no subscription.
  3. On first use, it'll prompt for the key — or run Stack Trace Triage: Set OpenRouter API Key from the command palette.
  4. (Optional) Pick a model with Stack Trace Triage: Select Model. Defaults to Claude Sonnet 4.6 — debugging needs real reasoning.

How to use it

From an editor / log file: select an error message or stack trace → Cmd+Alt+T (Mac) / Ctrl+Alt+T (Win/Linux) → diagnosis opens in a Markdown preview to the side.

From the terminal: copy the error → run Stack Trace Triage: Triage Stack Trace from Clipboard from the command palette (or right-click in the terminal).

Languages supported

Runtime Frame patterns detected
Node / JS / TS at funcName (/abs/file.ts:12:34)
Python File "/abs/file.py", line 42, in funcName
Java / Kotlin / Scala at com.foo.Bar.baz(Bar.java:42)
Go /abs/file.go:42 +0x12
Rust at /abs/file.rs:42:7
Ruby /abs/file.rb:42:in 'funcName'
PHP /abs/file.php(42): funcName()
Anything else generic path:line[:col] fallback

Settings

Setting Default Description
stackTraceTriage.openRouterApiKey — Your sk-or-... key
stackTraceTriage.model anthropic/claude-sonnet-4.6 Any OpenRouter slug
stackTraceTriage.maxFramesToFetch 5 Top-N frames to feed the AI
stackTraceTriage.contextLinesPerFrame 20 Lines of context per frame
stackTraceTriage.skipNodeModules true Skip frames in node_modules, site-packages, vendor, …
stackTraceTriage.language english Language for the diagnosis

Bring your own model

Any OpenRouter slug works. Recommended:

  • Claude Sonnet 4.6 (default) — best correctness for debugging
  • GPT-5.4 / GPT-5 Mini — strong alternatives
  • o4-mini-high — reasoning model, great for tricky bugs
  • Gemini 3.5 Flash — cheapest, surprisingly capable for simple errors

Privacy

The selected stack trace + the source code from the resolved frames is sent to OpenRouter and then to the provider behind your chosen model. Nothing else.

License

See LICENSE.


Built by Ciro Cesar Maciel. Sibling extensions: AI Commit Message Generator, TODO Hunter, Regex Whisperer.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft