TraceBug is a local-first debugging assistant. Capture a bug → produce a single self-contained .html file → hand it to your AI coding agent (Claude Code, Cursor, Windsurf), which reads the evidence over a local MCP server and fixes it — or email/Slack it to a human dev who opens it offline. Every report also embeds a failing test the agent runs to verify the fix.
Every report opens with:
🔍 Possible Cause (high confidence): API POST /orders failed with 500 after clicking 'Place Order'
> TL;DR: TypeError thrown on /checkout when clicking 'Place Order' button
No account to capture. No SaaS lock-in. Data stays in your browser by default. (Site Audit asks for a free account after 3 audits.)
Optional cloud sharing (built, UI-gated off by default): if you'd rather share a URL than a file, sign in once and get a share link with the same content. The code ships behind a feature flag (PHASE2-CLOUD); the Share button stays disabled until the portal is switched on. Local .html export is the supported sharing path today.
Works with any frontend framework: React, Angular, Vue, Next.js, Nuxt, Vite, Svelte, SvelteKit, Remix, Astro, or plain HTML.
⚡ Get Started in 30 Seconds
New here? Report your first bug in 2 minutes →
npx tracebug init
That's it. The CLI detects your framework and prints the exact 2-line snippet. Paste it into your app, run npm run dev, and you'll see the TraceBug toolbar on the right edge.
Report a bug in 2 clicks:
- Press
Ctrl+Shift+B (or click the ⚡ button on the toolbar)
- Review the auto-filled report, click "Copy GitHub Issue"
- Paste into your repo. Done.
What TraceBug Does
Tester opens the page
↓
Audit the page first (optional):
• 🩺 Audit this page — score + accessibility, layout, phone width,
speed, SEO and error findings with fixes
↓
Arm a session (idle until you act):
• ⚡ Quick Bug — Ctrl+Shift+B opens the ticket-review modal
• 📷 Screenshot / Region
• 🔴 Record — Sentry mode: rolling video buffer + HUD with timestamped
comments. File multiple bugs from one screen-share.
• ⏺ Track session — event-only capture (no video). Survives full-page
navigation, so clicking a link keeps recording.
↓
The SDK captures: clicks, inputs, navigation, API calls, console, errors, the DOM
stream (rrweb), environment, and a redacted Web-Storage snapshot
↓
Review the ticket, then export:
• Export .html — self-contained interactive DOM replay (KB, not MB)
• Export for AI (.html) — tiny text-only report to paste into a chat
• Download report (.md) · .zip (GitHub-attachable) · failing test (.spec.ts)
• Export HAR · file a real GitHub/Linear/Slack/Jira issue
↓
Complete report includes:
- Auto-generated title + smart summary + root-cause hint (high/medium/low confidence)
- Steps to reproduce, full session timeline
- Interactive DOM replay (or screen recording .webm), screenshots
- Console errors + stack traces, failed network requests with response snippets
- Environment (browser, OS, viewport, device)
↓
Send the .html → developer opens it offline and sees exactly what happened,
or an MCP-connected coding agent reads it and debugs from it.
Scan Page (a11y via axe-core, broken images, mixed content, frustration
signals, failed/slow APIs, JS errors) is available programmatically as
TraceBug.scanPage(); it is no longer a toolbar button.
Two Ways to Use TraceBug
Option 1: npm Package (For Developers)
Install the SDK in your project — best for teams who want TraceBug always active on dev/staging.
npm install tracebug-sdk
import TraceBug from "tracebug-sdk";
TraceBug.init({ projectId: "my-app" });
Option 2: Chrome Extension (For Non-Developers)
Install the browser extension — no code needed. QA testers, PMs, and clients can use it on any website.
Install from Chrome Web Store — one click, works immediately.
| Browser |
Supported |
| Chrome |
Yes — install from Chrome Web Store |
| Edge |
Yes — Chrome Web Store extensions work natively |
| Brave |
Yes — Chrome Web Store extensions work natively |
| Opera |
Yes — install "Install Chrome Extensions" add-on first |
| Firefox |
Yes — install from Firefox Add-ons (Firefox 128+) |
Browser support
| Browser |
npm SDK |
Extension |
| Chrome |
✅ |
✅ |
| Edge |
✅ |
✅ |
| Brave / Opera |
✅ |
✅ |
| Firefox |
✅ |
✅ (128+) |
| Safari |
✅¹ |
❌ (SDK only) |
The SDK is framework- and browser-agnostic — it runs anywhere modern JS runs.
¹ The interactive DOM-replay export uses the browser-native CompressionStream /
DecompressionStream (Chrome 80+, Firefox 113+, Safari 16.4+); on older engines
the exporter ships the replay uncompressed and the viewer falls back to the
screenshot gallery. The extension runs on Chromium browsers and Firefox 128+ (no
Safari build — on Safari, use the npm SDK).
Features
🩺 Site Audit — Score a Page, Then Let Your Agent Fix It (v1.12)
One click (Audit this page in the extension popup, or the toolbar's Audit button) checks the page you are on for accessibility (axe-core, WCAG 2.0–2.2 A/AA, plus keyboard checks), layout, phone width (390px), performance (LCP, CLS, heavy images), SEO (tags, structured data, robots.txt, sitemap) and runtime errors. Local: nothing is clicked, typed or uploaded (it reads the site's robots.txt and sitemap, and loads the page once more, hidden, at phone width).
- A 0–100 score per category and overall, coloured good / fair / poor, with the formula shown.
- One finding per real problem, grouped by rule: the WCAG criterion, found vs required values, how to fix it, and every element with Locate and Copy selector. Contrast findings suggest a passing colour.
- Results axe can't decide go to Needs a person to check, not the score.
- Copy for AI pastes a fix prompt; Export report gives an
.html your agent reads with get_audit / get_finding, and compare_audits confirms the fix after a re-run.
Guide: docs/site-audit.md.
🧠 Debugging Assistant (v1.3)
Every report opens with four derived signals that turn "what happened" into "why it likely happened":
| Signal |
What it looks like |
| 🔍 Root Cause Hint |
"API POST /orders failed with 500 after clicking 'Place Order'" with confidence tier (high/medium/low) |
| TL;DR |
One-sentence summary combining network + error + click + page signals |
| User clicked |
Tag, text, selector, id, aria-label, testId for the last click before the bug |
| Recent Actions |
Last ~10 user actions as plain-English steps ("Clicked 'Edit' button", "Navigated to /checkout") |
Plus:
- Network response snippets — first 200 chars of every failed
fetch/XHR response body, captured asynchronously (never blocks the request)
- In-memory failure buffer — last 10 failed requests accessible via
TraceBug.getNetworkFailures()
- Deterministic — pure functions, no AI APIs, O(1) on already-computed report fields
All four signals ship inline in GitHub issues, Jira tickets, PDF reports, and the Quick Bug modal. See docs/bug-reporting.md for full output examples.
🤖 MCP Server — AI Agents Debug Your Reports (v1.5)
Your coding agent (Claude Code, Cursor, Windsurf, VS Code) reads TraceBug bug reports and fixes the bug — fully local, nothing uploaded:
claude mcp add -s user tracebug -- npx -y tracebug mcp
No --dir needed: it finds reports in your project and in your Downloads and Desktop folders, where exports land. On native Windows, use -- cmd /c npx -y tracebug mcp. -y skips npx's install prompt but does not pin a version — it resolves whatever's newest on the npm registry at the time it runs. For a known, audited build instead, pin explicitly: npx tracebug@1.12.0 mcp (bump the version when you deliberately upgrade). Setup for Cursor, Windsurf and VS Code: docs/mcp.md.
The server reads the same self-contained .html files TraceBug exports. A tester hands a dev the report file, the dev saves it, and the agent gets twelve tools: list_bug_reports, get_bug_report, get_console_errors, get_network_activity, get_repro_steps, get_screenshot (real image content), get_playwright_test, resolve_stack, and get_fix_context for bug reports, plus get_audit, get_finding and compare_audits for Site Audit exports. get_bug_report returns a prioritized investigation guide computed from what the report contains, so the agent knows exactly which tools to call next. Console stacks + failed-request bodies + repro steps + frustration signals — everything an agent needs to go from bug report to fix.
The last three close the fix loop (v1.9): get_playwright_test returns the generated failing Playwright spec that replays the session and asserts the captured failure is gone — red until the bug is fixed, green after — so the agent can run it, patch, and re-run until green. resolve_stack maps the report's minified stack frames to original source files/lines using .map files found in the repo the server runs from. get_fix_context is a one-call fix starter: the failing request with response snippet, the user action that triggered it, the source-map-resolved top stack frames, and whether a failing test is available.
The audit tools read an exported Site Audit: get_audit lists which checks ran (and what each can't tell you) plus the findings, get_finding returns one finding's evidence and codebase search hints, and compare_audits diffs two exports of the same page — fixed, still present, new, regressed — so the agent can verify its fix after you re-run the audit. Text taken from the audited page is marked untrusted, so agents treat it as data, not instructions.
Kicking off is one paste: the extension shows a ready-made agent prompt after every Export .html (auto-copied), the exported file itself carries the same prompt in its AI tab, and in Claude Code you can just type /tracebug:debug_bug_report.
Other tools' MCP servers are cloud-hosted: your bug data must live on their servers first. TraceBug's runs on your machine over stdio and opens zero network connections. Try it instantly — this repo ships a demo report and a pre-configured .mcp.json. See docs/mcp.md.
🎭 Playwright Reporter — Bug Reports From Failed Tests (v1.6)
Every failed Playwright test becomes the same self-contained .html bug report — assertion error + code snippet, step timeline as repro steps, page console + network (via the optional fixture), failure screenshot, and a root-cause hint. Upload bug-reports/ as a CI artifact, then debug it with your agent via the MCP server:
// playwright.config.ts — that's the whole setup
reporter: [["list"], ["tracebug-sdk/playwright", { outputDir: "bug-reports" }]],
Nobody else captures bugs from test runs as portable files — cloud tools can't attach their viewer to a CI artifact. See docs/playwright.md.
🧠 AI Debugger — BYO-Key LLM Analysis (v1.6)
Run real LLM root-cause analysis with your own key — Anthropic, OpenAI, or local Ollama. The call goes directly from your browser to the provider: TraceBug never sees the key, the prompt, or the response, and the prompt is scrubbed of secret shapes before it leaves the page. No metered credits, no vendor cloud in the path.
Combined with the local heuristic hint and the local MCP server, this is AI debugging that never phones home — the one position no cloud-hosted, metered competitor can copy. See docs/ai-debugger.md.
🌐 HAR Export (v1.6)
One click exports the captured network activity as a standard HAR 1.2 file that opens in DevTools, Charles, Fiddler, or Postman. No competitor ships this — Jam even markets "everything a HAR offers" without the export. Your network capture is a portable file you own, not a row in someone's cloud. See docs/har-export.md.
🧪 Generated Failing Playwright Test (v1.9)
Every export carries a runnable Playwright spec that replays the captured session (locators prefer data-testid → id → aria-label → role+name → captured CSS selector) and asserts the captured failure is gone — the failing endpoint must stop failing, the console errors must stop being thrown. Red while the bug exists, green after the fix. Get it three ways: Download failing test (.spec.ts) in the Quick Bug More menu, embedded in the .html export, or via the MCP get_playwright_test tool — so an agent can run it, patch, and re-run until green.
🔎 Inspect Mode — Style Evidence for Design-QA Bugs (v1.9)
"The button looks wrong" now ships with the receipts. A DevTools-style inspect mode (extension popup → Inspect element, or TraceBug.activateInspectMode()): hover paints the box-model highlight plus a computed-style summary tooltip; click attaches the element to the report with a curated style snapshot — typography, colors as hex, box model — plus a WCAG text-contrast verdict (ratio + AA pass/fail). Surfaced on annotation cards, in generated GitHub issues, in the export, and as structured data MCP agents get from get_bug_report.
🎬 Pre-Recording Options + Element-Level Blur (v1.9)
The extension popup's ⚙ Record options panel offers Record video too (on by default in Chrome, where Tab mode records the tab with no share picker; off by default in Firefox, which only has the share picker. A capture is always console/network/replay either way), an optional 3s/5s countdown, and Blur before recording — redact sensitive areas before the first frame is captured. The full set is also a public SDK API: TraceBug.prepareRecording({ blurFirst, delaySec, surfaceMode, withMicrophone }).
Blur itself is element-level, click-to-blur: hover highlights, click applies filter: blur(12px) to the element itself, click again unblurs. Because the blur is part of the element's own rendering, it physically cannot lag behind scrolling. Blurred elements also get tb-mask, so the DOM replay masks their text, not just the video pixels.
📦 Reports the Recipient Can Act On (v1.8)
- Download .zip (attach to GitHub) — the same offline replay wrapped in a
.zip, because GitHub issues accept .zip attachments by drag-and-drop but reject bare .html.
- Issue actions inside the exported report — the viewer header has Open GitHub issue (prefilled URL when the exporter configured
githubRepo) and Copy issue markdown (fully offline, pastes into any tracker). Both are precomputed at export time from the already-redacted report.
Auto-Captured (Zero Effort)