Time travel debugging

Time travel debugging has been the holy grail for the past 60 years because if you can capture the bug, you can replay it, and inspect it as if it's running live.

Time travel changes the way we see our software and collaborate with our teams.

Time travel fundamentals.

Don't record your app. Record your runtime.

Time travel refers to the ability to record and deterministically replay the runtime down to the event loop and microtask queue.

In order to pull this off, the runtime needs to think it’s running on the original computer at the original time.

0101011101100101001000000110110101100001011010110110010100100000011000110110111101101111011011000010000001110011011010000110100101110100001000000111010001101000011000010111010000100000011100000110010101110010011001100110111101110010011011010111001101010111011001010010000001101101011000010110101101100101001000000110001101101111011011110110110000100000011100110110100001101001011101000010000001110100011010000110000101110100001000000111000001100101011100100110011001101111011100100110110101110011010101110110010100100000011011010110000101101011011001010010000001100011011011110110111101101100001000000111001101101000011010010111010000100000011101000110100001100001011101000010000001110000011001010111001001100110011011110111001001101101011100110101011101100101001000000110110101100001011010110110010100100000011000110110111101101111011011000010000001110011011010000110100101110100001000000111010001101000011000010111010000100000011100000110010101110010011001100110111101110010011011010111001101010111011001010010000001101101011000010110101101100101001000000110001101101111011011110110110000100000011100110110100001101001011101000010000001110100011010000110000101110100001000000111

SkateboardSkateboard

Record the randomness. Replay the rest.

99.9% of compute is deterministic and does not need to be recorded. The challenge with recording Chrome is knowing how to capture the .1% that's non-deterministic.

Because 99.9% of compute is deterministic, time travel has the ability to be incredibly lightweight, lossless, and capable of post-hoc dynamic analysis.

0101011101100101001000000110110101100001011010110110010100100000011000110110111101101111011011000010000001110011011010000110100101110100001000000111010001101000011000010111010000100000011100000110010101110010011001100110111101110010011011010111001101010111011001010010000001101101011000010110101101100101001000000110001101101111011011110110110000100000011100110110100001101001011101000010000001110100011010000110000101110100001000000111000001100101011100100110011001101111011100100110110101110011010101110110010100100000011011010110000101101011011001010010000001100011011011110110111101101100001000000111001101101000011010010111010000100000011101000110100001100001011101000010000001110000011001010111001001100110011011110111001001101101011100110101011101100101001000000110110101100001011010110110010100100000011000110110111101101111011011000010000001110011011010000110100101110100001000000111010001101000011000010111010000100000011100000110010101110010011001100110111101110010011011010111001101010111011001010010000001101101011000010110101101100101001000000110001101101111011011110110110000100000011100110110100001101001011101000010000001110100011010000110000101110100001000000111

Debugging as a database.

Breakpoint debugging lets you pause a program at a point in time and explore the current state. Time travel debugging lets you pause at any point in time and explore.

At a higher-level, time travel lets you query the state of the program across time. This is how we build Replay DevTools and how anyone can extend our protocol to build even more futuristic DevTools.

A new way to console.log

What would console logging from the future look like?

Console logs

Add logs with a single click.

First, you should be able to retroactively add a print statement and see the logs as if they were always there.

console

Jump to any console log.

Second, you should be able to jump to a console log, inspect the state, and stop guessing.

DevTools

Stay in the state of flow.

Lastly, you should be able to inspect your app with Browser DevTools at any point in time stay in the state of flow.

Time travel's roadmap.

Time travel is an idea that is as old as computer science itself that most people dismissed as too difficult. Today it is finally time for it to take off!

1960s
Early Research
Researchers like Lamport and Clapp demonstrated that deterministic replay was possible.
2000s
Omniscient Debugging
Researchers like Lewis, Shapiro, and Sagiv program state could be efficiently queried.
2010s
Record and Replay
Companies like Mozilla, Microsoft, and Undo released the first systems-level record and replay debuggers.
2022
Browser DevTools
Replay.io released the first browser recorder with Replayable Print Statements, Graphics, Networking, and React DevTools.
2024
Fullstack Debugging
We will release the first Full Stack time-travel enabled debugger for JS web applications in 2024.
2025
Replayability
Time travel ushers in a new era of replayability that enables dynamic analysis at scale.

Record your first replay