Feature Overview¶
Undo for Java provides a comprehensive set of time travel debugging capabilities. This page gives a quick tour of what you can do. Each section links to the detailed documentation.
Automation and Integrations¶
Undo for Java can be driven by more than “start Java and press buttons”. If you need to integrate with containers, CI, or production incident response:
REST API — start, stop, and save recordings via HTTP endpoints.
Recording save callbacks — run your own code when a recording is saved (for example upload to S3).
Signals — control recording with OS signals.
Python API and AI-Assisted Debugging with MCP — scripted and AI-assisted analysis of recordings.
Recording¶
Record the execution of any Java application on Linux, producing a recording file that can be replayed later on any supported platform.
Simple integration: Add a few JVM arguments to your existing command line. No code changes required. See Recording an application.
Delayed start: Skip application startup to reduce recording overhead. Start recording after a specific class is loaded or after a threshold number of classes are loaded. See When to start recording.
Programmatic control: Use the Java API to start, stop, and save recordings from your application code.
Signal-based control: Start and stop recording by sending a signal to the JVM process. See Using a signal to start recording.
REST API: Start and stop recording via HTTP endpoints. See REST API.
Save callbacks: Get notified when a recording is saved, for example to upload it to S3. See Recording save callbacks.
CI integration: Record test runs under Gradle, Maven, or Ant and automatically save recordings of failing tests. See Recording test failures.
Thread fuzzing: Perturb thread scheduling to help reproduce concurrency bugs. See Thread Fuzzing.
Recording portability: Recordings are portable across supported Linux distributions, containers, VMs, and WSL2. See System Requirements.
Interactive Debugging in IntelliJ¶
Replay a recording in IntelliJ IDEA and debug it with the Time Travel Debug for Java plugin. All the familiar IntelliJ debugging features work, plus time travel capabilities.
Forward and reverse execution: Step forwards and backwards through your code, or resume forwards and backwards to breakpoints and watchpoints. See Time travel debugging in IntelliJ.
Breakpoints and watchpoints: Use standard IntelliJ breakpoints and field watchpoints. Watchpoints are especially powerful in reverse: set a watchpoint on a field and resume backwards to find what changed it.
Log Jump: Navigate directly to a point in execution by timestamp, bbcount, span ID, or object ID. Paste a timestamp from a log file and jump straight to where that log line was emitted. See Log Jump.
Log Viewer: Open a log file and click on any timestamped line to jump to that point in the recording. See Log Viewer.
Bookmarks: Mark points of interest in the execution history and jump between them. See Bookmarks.
Copy Object ID: Right-click any object in the IntelliJ debugger variables panel and choose Copy Object ID, then use it with Log Jump’s Object ID field to find where that object was created.
Live debugging: Time travel debug a running application, not just a recording. See Live Debugging.
Microservices¶
Debug across service boundaries in microservice-based applications.
Step Across: Step from one service to another at the point where an API call is made. Works with HTTP/REST, reactive clients, and Java RMI. See Step Across.
Span-based navigation: Jump directly to a method invocation using an OpenTelemetry or Spring Cloud Sleuth span ID. See Microservices.
AI-Assisted Debugging¶
Use AI assistants such as Claude to automatically investigate recordings, diagnose root causes, and report findings in natural language.
MCP server: The
lr4j_mcptool exposes a full set of debugging tools over the Model Context Protocol, allowing AI assistants to programmatically control replay, set breakpoints, inspect variables, navigate through time, and more. See AI-Assisted Debugging with MCP.Python API: A typed Python API for writing analysis scripts that run against recordings. Suitable for batch analysis, profiling, and any task that requires iterating over events. See Python API.
Example tasks you can ask AI to do:
“Read the console output and find the root cause of the exception”
“Find where this object was created”
“Sample stack traces across the recording and show which methods are consuming the most time”
“Find all write system calls and show what was written”
“Go to this timestamp and show the local variables”
See What you can ask AI to do for more examples.
Analysis Tools¶
Offline analysis tools that run directly on recording files.
Python API: Write Python scripts to perform post-failure analysis, batch processing, or custom profiling. See Python API.
Method profiling: Measure the wall-clock time and bbcount for every call to a specific method. Useful for identifying why a method sometimes takes longer than expected. See Profiling commands.
Recording profiling: Sample stack traces across a recording to identify where CPU time is spent. See Recording profile.