When you find an issue or exception in a production environment you actually have two problems. Identifying the issue and understanding exactly how you got into the situation.

Logs tend to be really good at giving you the identity of the actual problem, and as an industry we have gotten really good at capturing exceptions and errors in our logs. However logs solve exactly one half of the problem. Our logs have the effect leaving bread crumbs for ourselves and we hope that they are sufficient to help orient ourselves so that we can imagine all the ways production might be using our code.

We solve our most intractable problems in our inner loop. We spend hours in this tight development cycle setting break points, and running to the cursor, stepping in and out of methods. However as soon as a relatively complex problem occurs in production we are forced to confront it with a whole new set of tools. It can be frustrating.

Ariadne Solution

In Greek mythology Ariadne was daughter of King Minos and she decided to help Theseus defeat the Minotaur. She gave Theseus a thread and told him to unravel it as he delved into the Labyrinth, this way if he was successful in killing the Minotaur he would have a way back.

Much like issues in production environment they were confronted with a problem in two parts:-

  • Killing the Minotaur (Fix the problem).
  • Getting into and escaping the Labyrinth (Understand how the bug occurs).

Time Travel Debugging

Time Travel Debugging (TTD) is a reverse debugging solution that allows you to record the execution of code in a web app or process and replay it both forwards and backwards. The Snapshot Debugger was extended with TTD to allow you to record your applications as it executes. That recording can then be played back in Visual Studio 2019 Enterprise where you can rewind and replay each line of code as many times as you want. So not only do get to recognize the exact problem but look at every step leading up to the problem. This is not remote debugging, so the process is not stopped and while debugging the recording your web application can continue to serve incoming traffic.

Time Trave Debugging Visual Studio

Check out the TTD preview!

Comment Section

Comments are closed.