Alternatively, use the ribbon buttons to navigate in the trace.
Example TTD Trace Replay
Use the g- command to execute backwards until either an event or the beginning of the TTD trace is reached. The events that can stop backward execution are the same that would stop forward execution. In this example, the start of the trace is reached.
dbgcmd
0:000> g-
TTD: Start of trace reached.
(3f78.4274): Break instruction exception - code 80000003 (first/second chance not available)
Time Travel Position: 29:0
ntdll!ZwTestAlert+0x14:
00007ffc`61f789d4 c3 ret
Use the p (Step) command to step forward in a TTD trace.
dbgcmd
0:000> p
Time Travel Position: F:1
ntdll!LdrpInitializeProcess+0x1bc5:
7774f828 740b je ntdll!LdrpInitializeProcess+0x1bd2 (7774f835) [br=1]
0:000> p
Time Travel Position: F:2
ntdll!LdrpInitializeProcess+0x1bd2:
7774f835 83bdd0feffff00 cmp dword ptr [ebp-130h],0 ss:002b:010ff454=00000000
0:000> p
Time Travel Position: F:3
ntdll!LdrpInitializeProcess+0x1bd9:
7774f83c 0f8450e8ffff je ntdll!LdrpInitializeProcess+0x42f (7774e092) [br=1]
You can also use the t (Trace) command to navigate in the trace.
dbgcmd
0:000> t
Time Travel Position: F:4
ntdll!LdrpInitializeProcess+0x42f:
7774e092 33c0 xor eax,eax
0:000> t
Time Travel Position: F:5
ntdll!LdrpInitializeProcess+0x431:
7774e094 e9f5170000 jmp ntdll!LdrpInitializeProcess+0x1c2b (7774f88e)
Use the p- command to step backwards in a TTD trace.
dbgcmd
0:000> p-
Time Travel Position: F:4
ntdll!LdrpInitializeProcess+0x42f:
7774e092 33c0 xor eax,eax
0:000> p-
Time Travel Position: F:3
ntdll!LdrpInitializeProcess+0x1bd9:
7774f83c 0f8450e8ffff je ntdll!LdrpInitializeProcess+0x42f (7774e092) [br=1]
You can also use the t- command to navigate backwards in time.
!tt navigation commands
Use the !tt command to navigate forward or backwards in time, by skipping to a given position in the trace.
!tt [position]
Provide a time position in any of the following formats to travel to that point in time.
If [position] is a decimal number between 0 and 100, it travels to approximately that percent into the trace. For example !tt 50 travels to halfway through the trace.
If {position} is #:#, where # are a hexadecimal numbers, it travels to that position. For example, !tt 1A0:12F travels to position 1A0:12F in the trace.
The ~s#, where # is a thread number, also switches to the given thread, but it doesn’t change the current position in the trace. When !tt is used to time travel to another thread’s position, any values you (and the debugger) read from memory will be looked up at that position. When switching threads with ~s#, the debugger doesn't change the current position internally,which is used for all memory queries. This works this way primarily so that ~s# doesn’t have to reset the debugger’s inner loop.
Learn how to efficiently debug your .NET app by using Visual Studio to fix your bugs quickly. Use the interactive debugger within Visual Studio to analyze and fix your C# applications.