Microsoft is introducing a very useful feature for its WinDbg Preview tool on Windows – Time Travel Debugging (TTD). Launched last month, WinDbg Preview provides great new debugging user experience and with the addition of TTD, users can go back in time to fix code problems, if any. This can help better understand the cause that leads up to the bug by repeatedly replaying it multiple times.
Time Travel Debugging (TTD) is a reverse debugging solution that allows you to record the execution of an app or process, replay it both forwards and backward and use queries to search through the entire trace.
- Record: Record the app or process on the machine which can reproduce the bug. This creates a Trace file (.RUN extension) which has all of the information to reproduce the bug.
- Replay: Open the Trace file in WinDbg Preview and replay the code execution both forward and backward as many times as necessary to understand the problem.
- Analyze: Run queries & commands to identify common code issues and have full access to memory and locals to understand what is going on.
To get started, install the WinDbg Preview (build 10.0.16365.1002 or greater) from the Store if you have Windows 10 Anniversary Update or newer at https://aka.ms/WinDbgPreview. and simply click File >> Start Debugging and point to the app or process.
More information on TTD can be found on docs.microsoft.com
See https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overview for a complete list of TTD commands.