DEV Community

Naman Khater
Naman Khater

Posted on

I built a bug reporting system into my VS Code extension — here's how it works

One thing I learned early while building CIPHER-Local — a VS Code extension that indexes your codebase and serves code intelligence to AI assistants via MCP — is that beta users won't file bugs if it's even slightly annoying to do so.

So instead of hoping people would manually dig through logs and paste them into a GitHub issue, I built the entire reporting pipeline into the extension itself. Every error is captured, structured, and one click away from becoming a useful bug report.

Here's how the system works, and how you can use it if you're trying CIPHER-Local.

Every error gets journaled automatically

Under the hood, CIPHER-Local catches every exception and writes it to an error_journal table in its local SQLite database. Errors are grouped by module and operation, deduplicated, and tracked with a repeat count.

The extension is organized into layers, and the module prefix tells you exactly where the problem happened:

  • l01-vscode — Extension lifecycle, commands, status bar
  • l02-indexer — Tree-sitter parsing, workspace file scanning
  • l03-store — SQLite database reads and writes
  • l04-query — Symbol and chunk query layer
  • l05-mcp — The MCP HTTP+SSE server
  • l06-embedding — ONNX model loading and BM25 fallback

When errors exist, the status bar shows something like ⚠ CIPHER: 3 errors. That badge is your entry point.

Path 1: The built-in flow (recommended)

This is the fastest way to report a bug — three steps, takes about 30 seconds.

Step 1 — Open the error viewer.
Click the ⚠ CIPHER: N errors badge in the status bar, or run Ctrl+Shift+P → CIPHER: View Errors.

A QuickPick panel opens showing all errors grouped by module. Each entry shows an icon (error/warning/info), the operation name like indexFile or mcpStart, the first 60 characters of the message, the timestamp, and how many times it repeated.

Click any entry to see the full detail — message, sanitized stack trace (file paths replaced with <path> so nothing private leaks), and structured context like the language being parsed, file extension, tool name, and duration.

Step 2 — Copy diagnostics.
Select Copy Diagnostics from the QuickPick footer, or run Ctrl+Shift+P → CIPHER: Copy Diagnostics.

This puts a structured report on your clipboard that looks like this:

Top comments (0)