Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time Travel Debugging: How to do it in C#?

In C++/Windbg, there is now Time Travel Debugging.

What is the path to do this in C#?

Note: I am looking for TTD from a C# app created in visual studio. Whether the TTD is in visual studio or in windbg (or some other tool) does not matter to me. The point is full TTD.

Intellitrace is not TTD. Intellitrace is an event and state capturing system. TTD is a "movie" of a debug dump, that allows you to capture the trace at run time, on any machine, and then replay your code in the debugger, as it executed during the run. You get full debug support, breakpoints, all variables, as it runs, and can play fwd and backward. TTD gives the full power of the interactive debugger, but disconnected in time and place from the actual execution being debugged.

The comments posted so far indicate that folks have not actually boned up on TTD, and are shooting from the hip. Please take the time to properly understand TTD before commenting, downvoting, etc.

NOTE TO SO COMMUNITY: MS is taking votes on this:

  • https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/31652272-time-travel-debugging
    and

  • https://developercommunity.visualstudio.com/content/idea/351585/time-travel-debugging.html

like image 255
Jonesome Reinstate Monica Avatar asked Oct 09 '17 23:10

Jonesome Reinstate Monica


People also ask

How do I debug time travel?

On the Time Travel menu, use Time travel to start or use the ! tt 0 command to move to the start of the trace. On the Home menu, select Go or use the g command, to move forward in the code until the breakpoint is hit. On the Home menu, select Step Out Back or use the g-u command to back one step.

Can you debug C?

Gdb is a debugger for C (and C++). It allows you to do things like run the program up to a certain point then stop and print out the values of certain variables at that point, or step through the program one line at a time and print out the values of each variable after executing each line.

What is UDB debugging?

UDB is an interactive time travel debugger for Linux C/C++ used in inner-loop development. Debug a live process and replay the process's execution history to get instant visibility into what your process just did, and why.


1 Answers

Time Travel Debugging is a feature in Windbg, in VS, it doesn't have the same feature, but it has been submitted to the product team

NOTE ABOVE LINK HAS MIGRATED: and is now here: https://developercommunity.visualstudio.com/content/idea/351585/time-travel-debugging.html

You could vote and add your comment there.

In addition, like Aybe's suggestion, IntelliTrace would be a simliar tool in VS IDE which could help you analyze code issue.

like image 171
Jack Zhai-MSFT Avatar answered Oct 19 '22 02:10

Jack Zhai-MSFT