Skip to content

rishapgandhi/devsession-replay

Repository files navigation

DevSession Replay

Zero-setup browser debugging — captures console, network, errors as shareable artifacts. AI-ready export. Chrome + Firefox.

License: MIT Chrome MV3 Firefox

The Problem

When you hit a bug during development, the context disappears — console logs scroll away, network requests vanish on navigation, and there's no way to package "what just happened" for a teammate or AI assistant.

Features

  • Always-on recording — Captures console, network (fetch/XHR), and errors in a circular buffer (constant memory)
  • One-click capture — Press Alt+Shift+D or click "Capture Now" to snapshot the last 60 seconds
  • Auto-capture on error — Optionally triggers on uncaught exceptions
  • AI-ready export — "Copy for AI" formats errors + failed requests as a structured prompt
  • Privacy-first — Auto-redacts auth headers, cookies, passwords. All data stays local.
  • Multiple exports — Self-contained HTML report, JSON, or AI prompt
  • Cross-browser — Chrome + Firefox via WXT framework

Quick Start

git clone https://github.com/rishapgandhi/devsession-replay
cd devsession-replay
npm install --legacy-peer-deps
npm run dev          # Chrome dev mode
npm run dev:firefox  # Firefox dev mode

Architecture

Page (MAIN world)         Content Script (ISOLATED)       Background
─────────────────         ──────────────────────────      ──────────
console/fetch/error  →→   window.postMessage relay  →→    CircularBuffer
                                                          ↓ (on trigger)
                                                          CaptureArtifact → Storage
                                                          ↓
                                                          Side Panel / Export

How It Works

  1. Injected script (MAIN world) monkey-patches console.*, fetch, and error listeners
  2. Content script (ISOLATED) relays messages to the background service worker
  3. Background stores entries in a circular buffer (constant memory, last 60s)
  4. Trigger (manual or auto) drains the buffer into a CaptureArtifact
  5. Side panel displays captures with console/network/errors tabs
  6. Export as AI prompt, JSON, or self-contained HTML

Tech Stack

Layer Technology
Framework WXT
UI React 18 + TypeScript
Styling Tailwind CSS
State Zustand
Data Structure Custom CircularBuffer
Testing Vitest

Contributing

Issues and PRs welcome. See CONTRIBUTING.md.

License

MIT © Rishap Gandhi

About

Zero-setup browser debugging tool — captures console, network, errors, and state as shareable artifacts. AI-ready export. Chrome + Firefox.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages