How Replay Works
This document is somewhat outdated. While we are working on this, please refer to Replay for New Contributors instead.
Replay.io (opens in a new tab) is the first time-travel debugger for runtimes like the browser and Node.
We wrote some blog posts outlining how it worked, covering the basics of how we record OS syscalls, use “effective determinism” to minimize the data needed, and turn browser processes in the cloud into a public API that can be used to introspect a program’s behavior:
- Overview (opens in a new tab)
- Recording and Replaying (opens in a new tab)
- Effective Determinism (opens in a new tab)
- Inspecting Runtimes (opens in a new tab)
There’s also a recent set of posts talking about the “effective determinism” aspect in more detail, including how we can replay the full browser behavior with a relatively small recorded set of input data, and how we investigate “runtime mismatch” errors internally:
- How to debug an Effectively Deterministic Time Travel Debugger? (Seriously.. how?!) (opens in a new tab)
- Cross Your Fingers and Hope to Crash (opens in a new tab)
For some additional details, see these docs pages:
For examples of how the Replay Protocol API is used, see the actual Replay DevTools client repo, the Replay Protocol API Examples repo, and the Protocol API docs