Why every Head of DevOps needs to know reverse debugging?

Alice Gajos
Dec 7, 2018 · 4 min read

DevOps is the union of people, processes, and products that enable continuous delivery of value to the end users. Building its culture requires the leader of the team to be a renaissance man, who can combine technical and interpersonal skills. In this article, I will share with you a quick tour of an innovative technology that will change the way companies meet SLA’s conditions in the next few years. It will allow you to be up to date in the world of DevOps technologies.

What is reverse debugging?

When searching the internet for the definition of reverse debugging, you will come across many contradictions. This is because reverse debugging is a relatively new technology, that is still dynamically developing. In order to convey what is reverse debugging in the simplest possible way, we can use an example from the physical world. Do you know how a flight recorder on the plane works? Reverse debugging is a similar technology, but it is implemented in software, not airplanes. It records everything that happens in your program and delivers you a detailed information about error-root-cause when it crashes.

You are probably wondering — how does it work in practice?

Developing software is a game full of surprises, which usually disturb the process of continuous delivery of value to your customers. Reverse debugging is a tool enabling developers to deal with the issues related to errors appearing in code.

Let’s list its main assumptions:

automating the process of errors detection,

The application built with an implementation of reverse debugging sends information about occurring problems to members of DevOps team.

delivering a detailed information about the cause of an error,

Which version of the application contains the bug? How many users experienced it? Which line of the code is the problematic one? Which values reprocessed by your application caused the problem? All of those are important questions, to which answers are the key when looking for the solution to the problem.

giving you the details of possible solutions.

One of the most important assumptions of DevOps is a quick response to appearing problems. Reverse debugging supports this process by boosting getting the information about the current status of the application on production. It gives you the details for solutions if some problems appeared. For example, you can check which commit of your application caused the error and to which part of the commit history you have to reset your project to in order to receive a working / bug-free version.

How to get that information?

As mentioned in the beginning, the reverse debugging tool is comparable with a flight recorder. But what does it actually record? The answer is simple: everything. Everything that happens in an application while it’s running on production. Every value of every variable, method, exception, field. etc. It brings to mind putting breakpoints on every single line of your code, and saving the results to a separate file, in order to dive into this data, when the crash appears.

How is this process carried out from the technical side?

First of all, we detect characteristic code structures and it’s AST tree. That part of the process allows you to get to know what changes we have to provide to create code working with an implementation of reverse debugging. At the stage of compiling the code, we are changing it’s AST tree (by static code injections) to create structures responsible for saving everything that happens in the application.

Right now you are probably wondering: is it a viable undertaking to create a whole reverse debugging infrastructure for an application? To answer this question, I will share with you numbers that my team had the opportunity to observe thanks to cooperation in projects which implemented this technology:

As you see from the comparison table, the longer a project lasts and the longer we provide maintenance to it, the more profitable it is to use reverse debugging. What’s more, thanks to the existence of some specialized reverse debugging tools, you can use ready-made solutions, instead of coding everything from scratch.


Reverse debugging, therefore, creates a fully automated debugging system. This technology focuses on transforming an errors finding practice into a predictable process.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade