Time travel debugging is the ability to wind back the clock to any point in an application’s execution and see exactly what it was actually doing. Simple or intricate bugs can all be diagnosed much faster; and it is a powerful way for developers to learn about and navigate an unfamiliar codebase.
Step 1: RECORD
Record the execution of a program (down to instruction level) as it fails, and capture bugs in the act. The output – a recording – provides developers with all the data they need to understand what happened, without wasting days or weeks trying to reproduce the issue.
Step 2: REPLAY
Replay the recording forward and backward – at anytime and on any machine – to diagnose the root cause of the issue. Replay can be likened to "winding the tape" back and forth in real time in order to get a clear picture of a program's execution.
Step 3: RESOLVE
Resolve bugs faster and with more predictability.
Time travel debugging equips developers with 6 new superpowers:
- Go back to any point in your application's execution history and inspect the complete state of the application at that point in time, including the contents of all variables and the heap.
- Use the full range of debugger functionality to navigate your application’s execution: stepping, running, breakpoints, watchpoints, catchpoints, etc., but in reverse as well as forward. This is called reverse debugging.
- Navigate through your application’s execution history in ways simply not possible in a conventional debugger: e.g. spot a line of interest in a log file, then jump inside a recording to the point in time when the application emitted that log line, or jump to the previous time the application made a particular system call.
- Query (rather than debug) your application’s behavior. For instance, add new logging statements to the source code and see the results instantly, without having to rebuild and redeploy the application.
- Replay a recording of your program’s execution taken from a failed CI or QA run. The application’s behavior is 100% reproducible each time the recording is replayed – even if it’s days or weeks later.
- Collaborate with other developers by sharing bookmarks and comments at points in time in these recordings.
Time travel debugging is best suited for:
- Bugs where time passes between the bug occurring and the symptoms presenting themselves, i.e. assertion failures, segmentation faults, or simply unexpected behavior.
- Bugs which occur intermittently or sporadically, i.e. a bug that occurs one time in a thousand, or occurs in a different way on each run of the program. Bugs tend to manifest in this way when the program’s execution is non-deterministic due to multithreading and/or interaction with other processes and services.
Most race conditions fall into one or both of these cases; so do many memory or state corruption bugs and non-trivial memory leaks.
Time travel debugging enables software development teams to create better software faster, and to fix customer issues more quickly. It can be deployed at any point in the software development lifecycle, whether in development, test, or production.
LiveRecorder brings time travel debugging to CI, enabling C/C++, Go, and Java software teams to easily and quickly diagnose the root cause of new regressions, legacy bugs, and flaky tests.
LiveRecorder takes the pain out of debugging:
- Capture the recording of an application failing under test (however intermittently) and it becomes 100% reproducible.
- Launch a ready-to-go debug session in your browser with a one-click workflow: jump from a test failure (or bug report) straight into a replay of the recording that captured the bug.
One click from failed test to the recording that captured the bug
- Time travel debug the recording to easily navigate the codebase, understand what happened, rapidly locate the root cause of issues, and fix defects coming out of CI faster and with 100% certainty.
LiveRecorder enables software teams to significantly improve developer productivity and code quality. Developers can not only save a huge amount of time on debugging, but also fix known bugs before they hit customers.
- A systematic, repeatable debugging workflow, making bug fixing more predictable
- A guaranteed solution for capturing intermittent bugs that cannot be caught any other way
- A dramatically improved developer experience during debugging, increasing developer productivity and job satisfaction
- Effective asynchronous collaboration when working on bugs across teams and time zones (share recordings, add comments, etc.)
- Full visibility into what the software is doing, enabling new team members to rapidly get productive on unfamiliar source code (to familiarise themselves with the current implementation or to debug issues) and helping to reduce onboarding time