Every developer knows this exact headache: your compiler throws a red squiggle on Line 38, you jump down to Line 38, and... it’s completely blank. Or it’s a single closing } that looks totally fine.
Nine times out of ten, the real culprit is a missing brace, an unclosed parenthesis, or a forgotten </div> 25 lines higher up that cascaded all the way down the file.
I wanted a fast way to hunt down these "phantom" errors inside VS Code without scrolling up and down counting brackets—but I didn't want another AI tool that silently rewrites my code for me.
Lately, I've been focusing on sharpening my web development fundamentals (TypeScript, JavaScript, HTML, CSS, Java). When you're actively building and retaining your coding skills, letting an AI auto-fix every syntax slip robs you of the debugging intuition you actually need.
So I built Ghost Trace (#ghostTrace / @trace)—and v0.3.0 is now live on the Visual Studio Code Marketplace!
- Install on VS Code Marketplace: Vscode Marketplace
- Source Code (MIT License): Github
Quick Install in VS Code
Search ghost-trace (Zyrndotio) directly in your VS Code Extensions sidebar, or press Ctrl + P (Cmd + P on macOS) and run:
ext install Zyrndotio.ghost-trace
What Ghost Trace Does
Ghost Trace hooks into GitHub Copilot Chat to trace cascading syntax and structural bugs back to their true origin—across any language supported by VS Code diagnostics.
-
Multi-File Tracing (Including Closed Files): In v0.3.0, you don't even need files open in editor tabs. Pin or attach one or more files in Copilot Chat (using
#fileor the paperclip icon), ask@traceor#ghostTraceto investigate, and it analyzes all of them together. - Structured, Per-File Breakdowns: Instead of dumping a wall of text, Ghost Trace organizes its response under clean per-file sections covering Overview, Status, Root-Cause Location, Cascade Explanation, and Fix Guidance.
- Guidance-First, Zero Auto-Edits: Ghost Trace is strictly read-only—it never edits or applies changes to your workspace files. It shows you where and why the error cascaded so you fix it yourself and actually retain the skill.
-
Cross-File Clickable Line-Jump Links & Follow-Ups: Referenced line numbers render as interactive
[Line X]links. Clicking one opens that file (even if it was closed), jumps your cursor straight to the root-cause line, and briefly highlights it—followed by one-click learning prompts about error cascades and prevention.
Under the Hood: Bun + VS Code Language Model Tools
Since I dislike heavy npm/yarn boilerplate for developer tools, I built the entire project with Bun:
-
10ms Builds:
bun buildbundles the TypeScript extension straight to CommonJS (--target=node --format=cjs --external=vscode) in milliseconds. -
Modern Copilot Architecture: Alongside the
@tracechat participant, Ghost Trace registers a native Language Model Tool (#ghostTrace/ghost_trace_diagnose) viavscode.lm.registerToolso VS Code's Copilot Agent harness can invoke it directly—supporting optionalfilePaths(workspace-relative or absolute) andtargetLineinputs.
Here is a look at how Ghost Trace captures numbered file contents alongside live diagnostics before handing context to the model:
const diagnostics = vscode.languages.getDiagnostics(doc.uri);
const errorList = diagnostics.length > 0
? diagnostics.map(d => `- Line ${d.range.start.line + 1}: [${d.source || 'Compiler'}] ${d.message}`).join('\n')
: 'No active compiler errors detected in this file.';
const numberedCode = doc.getText()
.split('\n')
.map((lineText, idx) => `${idx + 1}: ${lineText}`)
.join('\n');
Try It Out & Share Feedback
Ghost Trace is open source under the MIT License, and I'm planning to keep expanding it with editor gutter markers and targeted structural checks in future releases.
- Install from Marketplace: Ghost Trace on VS Code Marketplace
- GitHub Repository: Github
- Portfolio & Other Projects: Github Profile
If you've ever wasted ten minutes hunting down a missing } or </div> on a blank line, install it, give it a spin, and let me know in the comments what features or languages I should tackle next!
Top comments (0)