Tracebug

io.github.prashantsinghmangat由 GitHub 账号 prashantsinghmangat 发布v1.11.5更新于 Nov 3, 2026

AI agents read TraceBug bug reports (console, network, replay, repro timeline) from local disk.

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

读取本地导出的 TraceBug 缺陷报告,让编程助手查看控制台错误、网络失败、复现步骤和截图,并据此修复缺陷。

可以做什么
  • 扫描目录中的缺陷报告文件并汇总标题、摘要、严重程度与根因提示
  • 读取单份报告概览、环境信息、测试者备注和按优先级排列的排查指引
  • 查看捕获的控制台输出与堆栈,以及网络请求(默认只看失败请求)
  • 获取复现上下文:通俗步骤、带挫败信号的用户操作和完整会话时间线
  • 以图片形式取回截图,并取回可重放会话的失败 Playwright 测试
  • 用本地 source map 还原压缩堆栈,并一次性取得修复所需的上下文
适用场景
当测试人员或 CI 已在仓库中生成 TraceBug 的 .html 报告文件,并希望编程助手基于这些证据而非文字描述来排查时适用。适合需要控制台、网络和回放数据的前端缺陷修复,也便于用失败测试验证修复结果。
运行要求
以本地 stdio 进程通过 npx 运行,启动时需指定存放导出报告的目录参数。需要 Node.js 与 npm。未声明任何账号、API 密钥、环境变量或请求头,服务器不建立网络连接。还原堆栈需在构建该应用的仓库目录下运行。
安装前请注意
报告包含捕获的用户输入、网络响应、控制台输出和截图,即使采集时已做脱敏,也应把报告目录视为敏感数据。未锁定版本的 npx 命令会在运行时拉取注册表上的最新版本,如需可审计的构建请固定版本。服务器本身只读取本地文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Tracebug,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

TraceBug

Capture the bug. Let AI fix it.
Local-first, zero backend. One .html file — full replay, console errors, network requests, repro timeline — that your AI coding agent reads over MCP and fixes. Opens offline for humans too.

[TraceBug demo: a checkout coupon bug is captured, and Claude Code fixes it]
▶ Watch the 1-minute demo (vertical Short) · watch Claude debug a real bug · try it live in the sandbox

[Install Chrome Extension] [npm install tracebug-sdk] [Live Demo]

[npm version] [npm downloads] [GitHub stars] [License: MIT]


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 accounts. No SaaS lock-in. Data stays in your browser by default.

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 →

bash
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:

  1. Press Ctrl+Shift+B (or click the ⚡ button on the toolbar)
  2. Review the auto-filled report, click "Copy GitHub Issue"
  3. Paste into your repo. Done.

What TraceBug Does

Tester opens the page  ↓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 DOMstream (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.

bash
npm install tracebug-sdk
typescript
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.

BrowserSupported
ChromeYes — install from Chrome Web Store
EdgeYes — Chrome Web Store extensions work natively
BraveYes — Chrome Web Store extensions work natively
OperaYes — install "Install Chrome Extensions" add-on first
FirefoxYes — install from Firefox Add-ons (Firefox 128+)

Browser support

Browsernpm SDKExtension
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

🧠 Debugging Assistant (v1.3)

Every report opens with four derived signals that turn "what happened" into "why it likely happened":

SignalWhat it looks like
🔍 Root Cause Hint"API POST /orders failed with 500 after clicking 'Place Order'" with confidence tier (high/medium/low)
TL;DROne-sentence summary combining network + error + click + page signals
User clickedTag, text, selector, id, aria-label, testId for the last click before the bug
Recent ActionsLast ~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:

bash
claude mcp add tracebug -- npx -y tracebug mcp --dir ./bug-reports

-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 [email protected] mcp --dir ./bug-reports (bump the version when you deliberately upgrade).

The server reads the same self-contained .html files TraceBug exports. A tester hands a dev the report file, the dev drops it in the repo, and the agent gets nine 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. 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.

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:

ts
// playwright.config.ts — that's the whole setupreporter: [["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 (off by default — a capture is always console/network/replay, and screen recording is opt-in), 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)

WhatDetails
ClicksElement tag, text, id, className, aria-label, role, data-testid, href, button type
InputsField name, type, value (sensitive fields auto-redacted), placeholder
DropdownsSelected option text + value, all available options
Form SubmitsForm id, action, method, all field values (passwords redacted)
NavigationRoute from → to (supports pushState, replaceState, popstate)
API RequestsURL, method, status code, response time (both fetch and XMLHttpRequest)
ErrorsMessage, stack trace, source file, line, column
Consoleconsole.error + warn + info + log (each non-error level capped at 50/session); warn/info render in the repro timeline
Unhandled RejectionsPromise rejection reason + stack
EnvironmentBrowser, OS, viewport, device type, connection, language, timezone

Sentry Mode — Rolling Video Buffer

Click Record once at the start of a QA session, file as many bug tickets as you want from the same screen-share. Inspired by NVIDIA Shadowplay / OBS replay buffer.

FeatureWhat it does
One-time pickerClick Record → pick screen/window/tab in the OS dialog. The HUD appears; you do QA normally.
📸 Capture buttonSnapshots the in-progress recording into a finished .webm and opens the ticket modal. Recording keeps running.
Timestamped commentsType a note in the HUD → press Enter → it's saved with the current video timestamp.
Auto-capture on errorWhen a JS error fires while armed, the error toast offers "Capture with video" — one click captures the buffer.
Smart StopIf you took at least one capture, Stop ends silently. Otherwise it opens the modal with the full recording.

Auto-Scanner

Click Scan to run six in-browser detectors in parallel and surface issues you might not have noticed:

DetectorWhat it catches
a11yWCAG 2.0/2.1 A+AA violations via axe-core
Broken images<img> elements that failed to load
Mixed contenthttp:// resources on HTTPS pages (CSP-blocked or downgraded)
JS errorsDeduped console errors + unhandled rejections
Failed requests4xx/5xx/network-error API calls with response body snippets
Slow APIsSuccessful calls over 2s

Each issue offers Locate (flash the offending element), File ticket (pre-fills the Quick Bug modal), and Dismiss.

QA Tools (One Click)

ToolWhat it does
Quick Bug CaptureCtrl+Shift+B opens the ticket-review modal with auto-filled title + description
ScreenshotCaptures viewport with auto-generated name (e.g., 01_click_add_vendor.png); added to the active ticket
Region ScreenshotDrag-to-select snipping-tool style; added to ticket
Voice NoteSpeak to describe the bug — speech-to-text via Web Speech API
GitHub IssueGenerates complete GitHub markdown — copies to clipboard, screenshots + .webm auto-download
Jira TicketGenerates Jira markup with priority + labels

Available Programmatically (cut from default UI in v1.0)

These features still ship in the bundle but no longer have toolbar buttons. Power users can call them directly:

typescript
TraceBug.activateAnnotateMode();   // element annotate mode (Ctrl+Shift+A no longer wired)TraceBug.activateDrawMode();       // live-page rectangles/ellipsesTraceBug.downloadPdf();            // PDF reportTraceBug.exportAnnotationsJSON();  // JSON / Markdown export

Auto-Generated

OutputDetails
Bug TitleSmart title from session context (e.g., "Vendor Update Fails — TypeError")
Repro StepsNumbered steps generated from event timeline
Session TimelineDebug timeline with elapsed timestamps for every event
Environment SnapshotBrowser version, OS, viewport, device type, connection

Smart Filtering

  • SDK self-filtering: TraceBug never records its own UI interactions (clicks on the dashboard, annotation canvas, buttons)
  • Framework noise removal: Internal dev-server requests (webpack HMR, Vite ping, Next.js stack frames) are automatically excluded from timeline and reports
  • Duplicate error dedup: Consecutive identical errors are collapsed

User Identification & Bug Workflow

typescript
// Identify who's using the app (persisted in localStorage)TraceBug.setUser({ id: "user_123", email: "[email protected]", name: "Jane" });
// Flag current session as a bug (adds red BUG badge)TraceBug.markAsBug();
// Get a 2-sentence Slack-friendly summaryconst summary = TraceBug.getCompactReport();// "Bug on /vendor — TypeError: Cannot read 'status' after clicking Edit → selecting Inactive..."

Plugin & Hook System

Extend TraceBug without forking — filter events, enrich reports, or trigger custom actions:

typescript
TraceBug.use({  name: "slack-webhook",  onReport: (report) => { fetch("https://hooks.slack.com/...", { method: "POST", body: JSON.stringify(report) }); return report; },});
TraceBug.on("error:captured", (error) => console.log("Bug found:", error.data.error.message));

CI/CD Helpers

typescript
// In Playwright/Cypress testsexpect(TraceBug.getErrorCount()).toBe(0);
// Upload full session as test artifact on failureconst json = TraceBug.exportSessionJSON();

Installation

From npm

bash
npm install tracebug-sdk

From GitHub

bash
npm install github:prashantsinghmangat/tracebug-ai

Chrome Extension (No Code Required)

See Chrome Extension section below.

Configuration

typescript
TraceBug.init({  projectId: "my-app",        // Required: identifies your app  maxEvents: 200,             // Max events per session (default 200)  maxSessions: 50,            // Max sessions in localStorage (default 50)  enableDashboard: true,      // Show the floating bug button (default true)  enabled: "auto",            // Control when SDK is active (see below)});

enabled option

ValueBehavior
"auto"Enabled in dev/staging, disabled in production (default)
"development"Only when NODE_ENV is "development"
"staging"Dev + staging hosts (staging, stg, uat, qa in hostname)
"all"Always enabled, including production
"off"Completely disabled
string[]Custom hostnames, e.g. ["localhost", "staging.myapp.com"]

Programmatic API

Core

typescript
import TraceBug from "tracebug-sdk";
TraceBug.pauseRecording();TraceBug.resumeRecording();TraceBug.startRecording();   // alias for resumeRecordingTraceBug.stopRecording();    // alias for pauseRecordingTraceBug.isRecording();TraceBug.getSessionId();TraceBug.destroy();

Screenshots

typescript
// Capture full-viewport screenshot (auto-named from last event context)const screenshot = await TraceBug.takeScreenshot();// → { filename: "01_click_add_vendor.png", dataUrl: "data:image/png;...", ... }
// Snipping-tool style: user drags a region, press Esc to cancelconst region = await TraceBug.takeRegionScreenshot();// → { filename: "02_click_..._region.png", ... } | null
const allScreenshots = TraceBug.getScreenshots();

Voice Recording

typescript
// Check if voice recording is supported in the browserif (TraceBug.isVoiceSupported()) {  // Start recording — speech-to-text via Web Speech API (free, no API keys)  TraceBug.startVoiceRecording({    onUpdate: (text, interim) => console.log("Transcript:", text),    onStatus: (status, msg) => console.log("Status:", status),  });
  // Stop recording — returns the transcript  const transcript = TraceBug.stopVoiceRecording();  // → { id, timestamp, text: "When I click update the page breaks", duration }
  // Get all voice transcripts  TraceBug.getVoiceTranscripts();}

Voice transcripts are automatically included in GitHub Issue, Jira Ticket, and PDF reports.

Tester Notes

typescript
TraceBug.addNote({  text: "Button doesn't respond after selecting Inactive status",  expected: "Vendor should update successfully",  actual: "App throws TypeError and freezes",  severity: "critical",  // "critical" | "major" | "minor" | "info"});

Reports

typescript
// Generate complete bug report objectconst report = TraceBug.generateReport();
// Get auto-generated bug titleconst title = TraceBug.getBugTitle();// → "Vendor Update Fails — TypeError"
// Get GitHub issue markdown (copies to clipboard in dashboard)const markdown = TraceBug.getGitHubIssue();
// Get Jira ticket payloadconst ticket = TraceBug.getJiraTicket();// → { summary, description, environment, priority, labels }
// Download PDF reportTraceBug.downloadPdf();
// Get environment infoconst env = TraceBug.getEnvironment();// → { browser: "Chrome", browserVersion: "122", os: "Windows 10/11", ... }

Data Access

typescript
import { getAllSessions, clearAllSessions, deleteSession } from "tracebug-sdk";
const sessions = getAllSessions();const bugs = sessions.filter(s => s.errorMessage);clearAllSessions();deleteSession("session-id");

Standalone Utilities

typescript
import {  generateReproSteps,  captureEnvironment,  buildReport,  generateGitHubIssue,  generateJiraTicket,  generateBugTitle,  buildTimeline,  formatTimelineText,} from "tracebug-sdk";

Element Annotation & Draw

typescript
// Activate modes programmaticallyTraceBug.activateAnnotateMode();   // Click elements to annotateTraceBug.activateDrawMode();       // Draw shapes on the page
// Check stateTraceBug.isAnnotateModeActive();TraceBug.isDrawModeActive();
// Export all annotationsconst report = TraceBug.getAnnotationReport();const md = TraceBug.exportAnnotationsMarkdown();await TraceBug.copyAnnotationsToClipboard("markdown");
// DeactivateTraceBug.deactivateAnnotateMode();TraceBug.deactivateDrawMode();TraceBug.clearAnnotations();

Dashboard

The compact toolbar on the right edge of the screen provides:

  • ⚡ Quick Bug — open the ticket-review modal (Ctrl+Shift+B)
  • 📷 Screenshot — capture the page, with an annotation editor
  • ▢ Region — capture a selected region
  • 🔴 Record — screen recording (Sentry mode: rolling buffer + HUD)
  • ⏺ Track session — event-only capture, no video (survives navigation)
  • ✓ View saved tickets — the offline Saved Tickets list
  • ✕ — turn TraceBug off on this page

Annotate and Draw modes still ship in the bundle but were cut as standalone toolbar buttons in v1.0 — reach them programmatically or via the recording HUD's Pen button. See docs/annotate-and-draw.md.

Quick Bug modal

Review and edit the ticket, then export or file it:

  • Auto-generated title, summary, root-cause hint, reproduction steps, timeline
  • Interactive DOM replay (or the screen recording), screenshots gallery
  • Tabs: Info · Console · Network · Actions · AI · Events
  • Export: Export .html (replay) · Export for AI (.html) · Download report (.md) · Download .zip (GitHub-attachable) · Download failing test (.spec.ts) · Export HAR
  • File directly: GitHub · Linear · Slack · Jira (real issues with a configured token)

Keyboard Shortcuts

ShortcutAction
Ctrl+Shift+BOpen the Quick Bug ticket modal
Ctrl+Shift+STake a screenshot
EscExit the current mode / close the modal

Note: Ctrl+Shift+A (annotate) and Ctrl+Shift+D (draw) are no longer bound by default. The underlying modes remain callable via the programmatic API (TraceBug.activateAnnotateMode() / activateDrawMode()); draw mode is also reachable from the ✎ button on the recording HUD.

Documentation

Full documentation is in the docs/ folder:

Chrome Extension

The TraceBug Chrome Extension lets non-developers use all TraceBug features without writing code.

How to Install

Recommended: Install from Chrome Web Store — works in Chrome, Edge, Brave, and Opera.

From source (for developers):

  1. git clone this repo, then npm install && npm run build
  2. Open chrome://extensions/ → Enable Developer mode → Load unpacked → select tracebug-extension/

How to Use

  1. Navigate to any website (staging, production, localhost, internal tools)
  2. Click the TraceBug extension icon in the toolbar
  3. Toggle "Enable on this site" — the page reloads with TraceBug active
  4. The floating bug button appears on the page
  5. Use all QA tools: screenshots, notes, GitHub/Jira issues, PDF reports
  6. Quick actions also available directly from the extension popup

Extension Features

  • Per-site toggle — enable only on sites you're testing
  • Badge indicator — shows "ON" in green when active on current tab
  • Quick actions — Annotate, Draw, Screenshot, PDF Report, GitHub Issue, Jira Ticket from the popup
  • Active sites list — manage all enabled sites from the popup
  • Compact toolbar on page — same full-featured toolbar as the npm SDK
  • CSP-safe — uses chrome.scripting.executeScript with world: "MAIN" to bypass Content Security Policy restrictions

Browser Compatibility

BrowserSupported
Google ChromeYes
Microsoft EdgeYes
BraveYes
OperaYes (install "Install Chrome Extensions" add-on first)
FirefoxYes, 128+ — Firefox Add-ons

Chrome Web Store

TraceBug is published on the Chrome Web Store:

Install TraceBug Extension

Build from Source

bash
# Clone the repogit clone https://github.com/prashantsinghmangat/tracebug-ai.gitcd tracebug-ai
# Install dependenciesnpm install
# Build SDK (produces CJS + ESM + IIFE for extension)npm run build
# Output:#   dist/index.js              — ESM (npm package)#   dist/index.cjs             — CJS (npm package)#   dist/index.d.ts            — TypeScript declarations#   tracebug-extension/tracebug-sdk-ext.js — IIFE (injected by the browser extension)#   website/public/tracebug-sdk.js     — IIFE (plain <script> tag, window.TraceBug)

Run Example App

bash
cd example-appnpm installnpm run dev# Open http://localhost:3000

Test the Example Bug

  1. Go to /vendor
  2. Click "Edit"
  3. Change Status to "Inactive"
  4. Click "Update" — triggers TypeError
  5. Click the bug button to see the report with reproduction steps

Privacy

  • Sensitive fields auto-redacted (password, secret, token, ssn, credit)
  • ~20 token-shape patterns masked at capture (JWT, Bearer headers, cloud provider keys) — a logged secret never enters the report object
  • The export flow and the exported report show exactly what was masked: 🛡 N sensitive values auto-masked
  • App-specific PII covered via redact: { fields, patterns } in config — also settable in the extension popup's 🛡 Redaction rules section
  • All data stays in localStorage — nothing goes to TraceBug. You choose what's sent to GitHub, Linear, Slack or your AI provider
  • SDK never captures its own UI interactions
  • No external servers, no tracking, no analytics

Framework Compatibility

FormatFileWorks with
ESM (import)dist/index.jsVite, Next.js, Nuxt, SvelteKit, modern webpack
CJS (require)dist/index.cjsAngular CLI, older webpack, Node.js
IIFE (global)website/public/tracebug-sdk.jsPlain <script> tag (window.TraceBug); the browser extension injects its own build, tracebug-extension/tracebug-sdk-ext.js
TypeScriptdist/index.d.tsFull type support in both ESM and CJS

Uninstall

npm Package

bash
npm uninstall tracebug-sdk

Then remove the TraceBug.init() call from your app's entry file.


⭐ Star this repo if it saves you time

If TraceBug helped you ship faster, a star is the best way to say thanks — it helps other developers find it too.

[Star TraceBug on GitHub]

Spread the word:

Found a bug or have a feature idea? Open an issue — TraceBug was built because bug reports sucked. We're here to make them suck less.


Built with ❤ by Prashant Singh Mangat
MIT Licensed · No tracking · No backend · Your data stays in your browser

Chrome Extension

Go to chrome://extensions/ → click Remove on TraceBug.

License

MIT

Author

Prashant Singh Mangat

来源:README.md,提交 f28eb3e

工具

9

list_bug_reports

Scan a directory for TraceBug bug-report export files (.html/.json) and summarize each: title, summary, severity, root-cause hint, and captured-data counts. Start here.

输入参数dir

get_bug_report

Get the overview of one TraceBug bug report: title, summary, severity, root-cause hint, environment, tester annotations, and a prioritized investigation guide telling you which tools to call next for this specific bug. Call this before the other get_* tools.

输入参数file必填

get_console_errors

Get the captured console output (errors, warnings, logs) with stack traces from a TraceBug bug report.

输入参数file必填

get_network_activity

Get captured network requests from a TraceBug bug report. Defaults to failed requests (status >= 400 or 0) with response snippets; pass failuresOnly:false for every captured request.

输入参数file必填failuresOnly

get_repro_steps

Get the reproduction context from a TraceBug bug report: plain-English steps, structured user actions (with rage/dead-click frustration signals), and the full session timeline.

输入参数file必填

get_screenshot

Get one screenshot from a TraceBug bug report as an image. Screenshots are auto-named from the action that triggered them (e.g. 01_click_submit.png).

输入参数file必填index

get_playwright_test

Get the generated Playwright spec that REPLAYS this bug report's session and asserts the captured failure is gone — the test fails while the bug exists and passes once fixed. Save it, run it to reproduce, then use it to verify your fix.

输入参数file必填

resolve_stack

Map the minified stack traces in a TraceBug bug report to original source files/lines using .map files found in the current project (run from the repo that built the app). Returns bundled and original positions per frame.

输入参数file必填searchDir

get_fix_context

One-call fix starter for a TraceBug bug report: the failing request (with response snippet), the user action that triggered it, the first error with source-map-resolved top stack frames, and whether a generated failing test is available. Call this when you're ready to locate and fix the bug.

输入参数file必填searchDir

版本历史

3
  1. v1.11.5最新Nov 1, 2026
  2. v1.11.3Oct 29, 2026
  3. v1.9.0Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分