<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: prashant singh mangat</title>
    <description>The latest articles on DEV Community by prashant singh mangat (@prashantsinghmangat).</description>
    <link>https://dev.to/prashantsinghmangat</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4039529%2F8ec01358-9270-4c53-915e-5d70b930ca71.png</url>
      <title>DEV Community: prashant singh mangat</title>
      <link>https://dev.to/prashantsinghmangat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prashantsinghmangat"/>
    <language>en</language>
    <item>
      <title>I stopped copy-pasting console errors into Claude, so I built a bug report an AI agent can actually read</title>
      <dc:creator>prashant singh mangat</dc:creator>
      <pubDate>Tue, 21 Jul 2026 08:56:24 +0000</pubDate>
      <link>https://dev.to/prashantsinghmangat/i-stopped-copy-pasting-console-errors-into-claude-so-i-built-a-bug-report-an-ai-agent-can-actually-2002</link>
      <guid>https://dev.to/prashantsinghmangat/i-stopped-copy-pasting-console-errors-into-claude-so-i-built-a-bug-report-an-ai-agent-can-actually-2002</guid>
      <description>&lt;p&gt;Every bug I've ever received as a report looked like this: &lt;em&gt;"checkout is broken"&lt;/em&gt; plus a cropped screenshot. And every bug I've ever &lt;em&gt;debugged with AI&lt;/em&gt; looked like this: me, manually copy-pasting console output into Claude, then the network tab, then describing what I clicked, then apologizing for the formatting.&lt;/p&gt;

&lt;p&gt;Both halves of that loop lose the same thing: &lt;strong&gt;the evidence&lt;/strong&gt;. The stack trace, the failed request, the exact click that triggered it — all of it exists at capture time. It just never survives the trip to the person (or agent) fixing the bug.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://tracebug.dev" rel="noopener noreferrer"&gt;TraceBug&lt;/a&gt;: a capture tool that saves the entire browser session into &lt;strong&gt;one offline &lt;code&gt;.html&lt;/code&gt; file&lt;/strong&gt;, and a local MCP server that gives Claude Code, Cursor, or Windsurf read-tools over that file.&lt;/p&gt;

&lt;p&gt;Here's a real, unedited transcript of Claude going from crash to root cause in five tool calls: &lt;strong&gt;&lt;a href="https://tracebug.dev/proof" rel="noopener noreferrer"&gt;tracebug.dev/proof&lt;/a&gt;&lt;/strong&gt;. I'd rather show you than tell you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwbgeoh4f55uf6u8ruoho.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwbgeoh4f55uf6u8ruoho.jpg" alt="A self-contained TraceBug bug report .html opened offline in a browser — title, root cause, failed requests with token=[REDACTED], and a privacy row showing 3 sensitive values auto-masked" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the file
&lt;/h2&gt;

&lt;p&gt;A free Chrome extension (or npm SDK — works in any app) records what actually happened:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DOM replay&lt;/strong&gt; (rrweb-based) — the recipient sees the broken layout itself, not a screenshot of it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Console&lt;/strong&gt; — errors with stack traces&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network&lt;/strong&gt; — every request with method, status, timing, and response snippets for failures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repro timeline&lt;/strong&gt; — a millisecond-resolution log of what the user did: clicks, inputs, route changes, interleaved with the errors they caused&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Screenshots + environment&lt;/strong&gt; — browser, OS, viewport, storage snapshot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two clicks exports all of it as a single self-contained &lt;code&gt;.html&lt;/code&gt;. It opens offline in any browser. No account, no upload, no server — there is literally no backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  The MCP part
&lt;/h2&gt;

&lt;p&gt;The file is nice for humans. The interesting part is making it machine-readable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add tracebug &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; tracebug mcp &lt;span class="nt"&gt;--dir&lt;/span&gt; ./bug-reports
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That starts a &lt;strong&gt;local, stdio-only MCP server&lt;/strong&gt; — it opens zero network connections. It exposes tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;list_bug_reports&lt;/code&gt; — discover reports in the directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_bug_report&lt;/code&gt; — summary + an investigation guide telling the agent what to call next&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_console_errors&lt;/code&gt;, &lt;code&gt;get_network_activity&lt;/code&gt;, &lt;code&gt;get_repro_steps&lt;/code&gt;, &lt;code&gt;get_screenshot&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F509swo317a397sdq35gz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F509swo317a397sdq35gz.jpg" alt="The Console tab of a TraceBug report showing captured errors with stack traces — the same data an AI agent reads through the get_console_errors MCP tool" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So instead of narrating your bug to Claude, you say &lt;em&gt;"investigate the report in ./bug-reports"&lt;/em&gt; and it reads the evidence directly — in the order a human debugger would: symptom, then errors, then the network call that caused them, then the user action that triggered the call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design decisions that mattered
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Single file over a dashboard.&lt;/strong&gt; A &lt;code&gt;.html&lt;/code&gt; file survives everything: Slack, email, a ticket attachment, a USB stick, three years in a folder. Nothing to host, nothing to expire, nothing to grant access to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Local-first is the feature, not a compromise.&lt;/strong&gt; Cloud bug-reporting tools structurally can't offer "your session data never leaves your machine." An MIT-licensed tool with no backend can. This also makes the security review trivial: the MCP server is stdio-only, and you can read the source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compression does the heavy lifting.&lt;/strong&gt; The rrweb event stream is ~89% of a typical export and gzips 8–12×, so the file compresses via &lt;code&gt;CompressionStream&lt;/code&gt; at export time and inflates in the viewer with &lt;code&gt;DecompressionStream&lt;/code&gt;. Typical exports are KB-to-low-MB, not the tens of MB a video would be.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redaction at capture, not at export.&lt;/strong&gt; Token shapes — JWTs, &lt;code&gt;Bearer&lt;/code&gt; headers, &lt;code&gt;sk-&lt;/code&gt; keys, GitHub PATs, AWS/Slack/Google API keys, ~20 patterns — are masked &lt;em&gt;before they enter the report object&lt;/em&gt;. Sensitive URL params become &lt;code&gt;?api_key=[REDACTED]&lt;/code&gt;, password fields never record their values. If a secret never enters the data, no export path can leak it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The extension is &lt;strong&gt;Chrome-only&lt;/strong&gt; today (the npm SDK works in any app)&lt;/li&gt;
&lt;li&gt;Replay is rrweb-based, so &lt;strong&gt;canvas/WebGL-heavy apps lose visual fidelity&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;TraceBug ships &lt;strong&gt;evidence, not an LLM&lt;/strong&gt; — the investigation uses your own agent and your own API costs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What launch feedback is turning into
&lt;/h2&gt;

&lt;p&gt;I launched on Product Hunt last week and the roadmap is being built directly from the comments. Landing in the next release: a visible redaction summary in the export flow ("🛡 4 sensitive values auto-masked"), a &lt;code&gt;redact&lt;/code&gt; config option for app-specific PII fields, &lt;code&gt;console.warn&lt;/code&gt;/&lt;code&gt;console.info&lt;/code&gt; in the repro timeline, and a &lt;code&gt;.zip&lt;/code&gt; export because GitHub issues accept &lt;code&gt;.zip&lt;/code&gt; attachments but reject &lt;code&gt;.html&lt;/code&gt; (learned that one the hard way).&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it in 30 seconds
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://tracebug.dev/try.html" rel="noopener noreferrer"&gt;tracebug.dev/try.html&lt;/a&gt;&lt;/strong&gt; has intentional bugs waiting to be captured — no install needed to see the output format.&lt;/p&gt;

&lt;p&gt;Everything is MIT-licensed and free. If you try the MCP flow with your own agent, I want to hear the failure cases: what else would the report need for your agent to &lt;em&gt;fix&lt;/em&gt; the bug, not just diagnose it? Source maps? Git blame context? A generated failing test? That question is the next six months of this project.&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>ai</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
