Prompt
How do I use session replay to reproduce a bug users reported?
Latest observation
Session replay is best used as a forensic tool: find the user’s session, watch what happened right before the bug, then compare it to your app logic and logs to pinpoint the cause.
Here’s a practical workflow:
1) Identify the right session
Start with whatever you know about the report:
- user ID / email
- approximate time of the issue
- page or feature involved
- browser/device/OS
- any error message
- related support ticket or incident ID
Then filter your session replay tool by:
- user
- time window
- URL/page
- device/browser
- error events
- rage clicks / dead clicks / JS errors if your tool supports them
2) Watch the session around the failure
Replay the recording from a bit before the problem occurred and look for:
- the exact click or input sequence
- UI states that appeared unexpectedly
- missing loading states
- form validation issues
- navigation loops or repeated retries
- console errors or network failures
- freezes, blank screens, or layout shifts
Tip: don’t just watch the moment of failure—watch the 30–60 seconds before it.
3) Correlate replay with technical evidence
Session replay is strongest when combined with:
- browser console logs
- network requests/responses
- server logs
- application logs
- feature flag state
- A/B test variant
- release version / deploy timestamp
Look for mismatches like:
- UI says “saved” but API returned 500
- button was clicked, but no request was sent
- request succeeded, but the UI didn’t update
- bug only occurs in a specific feature-flag variant
4) Reproduce the bug locally
Use what you learned from the replay to recreate the conditions:
- same browser/device if relevant
- same route and user actions
- same data shape or account state
- same permissions/roles
- same feature flag or experiment assignment
- same screen size if layout is involved
If possible, replay the user path manually in staging with the same data setup.
5) Form a hypothesis and verify it
From the replay, make a concrete guess:
- “The submit button is disabled because state never updates after validation.”
- “The API response is malformed for records with empty metadata.”
- “A race condition occurs when navigating away during fetch.”
- “The modal closes before async save completes.”
Then confirm by:
- checking logs
- adding temporary instrumentation
- reproducing in dev/staging
- writing a failing test
6) Fix and confirm
After the fix:
- reproduce the bug again to ensure it’s gone
- watch a new session replay if possible
- verify errors/rage clicks disappear
- monitor metrics for recurrence
Tips for effective session replay debugging
- Use event markers: clicks, errors, API failures, and custom breadcrumbs.
- Capture application state if your tool supports it.
- Ensure PII masking so you can safely inspect sessions.
- Link replay sessions to support tickets and error tracking.
- Prioritize sessions with the same error signature or behavior pattern.
A good mental model
Think of replay as answering:
- What did the user do?
- What did the app do?
- Where did those diverge?
- Why did they diverge?
If you want, I can also give you:
- a step-by-step debugging checklist
- a template for investigating a replay
- or a workflow for specific tools like FullStory, LogRocket, Datadog, or Sentry Replay.