Session Replay for Debugging: Reproduce Any Bug From a Recording
A session replay records the DOM, console, and network of a real user session — so you stop guessing at 'steps to reproduce' and just press play. Here is how it works, and where it saves the most time.
Most bugs don't die because they're hard to fix. They die in a back-and-forth: 'Can't reproduce — what were the exact steps?' The reporter doesn't remember, the environment is different, and the ticket goes stale.
Session replay removes that loop. It records the DOM, console, and network of a real session and lets you replay it pixel-for-pixel — so reproduction stops being detective work and starts being a button you press.
What a session replay actually records
It's not a video. Tools like rrweb serialize the DOM and then record incremental mutations — clicks, inputs, scrolls, route changes — as a compact JSON event stream. On playback, the recorder rebuilds the page and re-applies each event in order. Because it's the real DOM, you can open dev tools inside the replay and inspect any element at any moment.
- DOM mutations — every element change, in order, with timestamps.
- Console — logs, warnings, and the exact error with its stack trace.
- Network — requests, status codes, and payload shapes.
- User input — clicks, keypresses (masked), scroll, and viewport size.
Why replays cut reproduction time
The expensive part of debugging is usually getting the bug to happen again. A replay collapses that to a single click, and it carries the three context streams you'd otherwise reconstruct by hand — what the user saw, what the code logged, and what the network returned.
From recording to fix, step by step
- Capture — the browser extension or SDK records the session quietly in the background.
- Attach — when a user clicks 'report a bug', the last N seconds of replay, console, and network are attached automatically.
- Reproduce — open the replay, scrub to the error marker, and watch the exact interaction that broke.
- Hand off — share a link, or let an AI agent read the structured context over MCP and draft the fix.
import { record } from 'rrweb';
const events: unknown[] = [];
record({
emit(event) {
events.push(event);
},
// mask sensitive inputs BEFORE anything leaves the browser
maskAllInputs: true,
});
// on 'report bug', ship only the last ~60s of events with the report
export function snapshot() {
return events.slice(-600);
}Session replay vs. screenshots and logs
| Feature | Screenshot | Console logs | Session replay |
|---|---|---|---|
| Shows what the user saw | ✓ | — | ✓ |
| Shows the exact steps | — | partial | ✓ |
| Includes the stack trace | — | ✓ | ✓ |
| Includes network calls | — | partial | ✓ |
| Inspect the live DOM | — | — | ✓ |
| Re-playable by an AI agent | — | text only | ✓ |
If you can replay it, you can reproduce it. And if you can reproduce it, it's already half fixed.BugMojo engineering
Gotchas worth knowing
Also budget for size — record incrementally and cap the buffer to the last minute or two — and test your replays across the browsers your users actually use, not just the one on your desk.
Install the free BugMojo extension and attach a replay, console, and network trace to any bug report — no project setup required.
Install the extensionFrequently asked questions
Frequently asked questions
Sources
- rrweb — open-source web session replay — rrweb
- Model Context Protocol — Anthropic (2025)
Get bug-tracking insights, weekly.
Engineering deep-dives, QA playbooks, and honest tool comparisons. No spam — unsubscribe in one click.

