FusionReactor Observability & APM

Troubleshoot

Blog / Info

Customers

About Us

Installation

Configure

Troubleshoot

Blog / Info

Customers

About Us

Debugging Java In Production With FusionReactor

FusionReactor Production Debugger

FusionReactor is a developer-focused production-grade monitoring tool for monolithic servers and distributed servers. It’s designed for software developers, technical support, and DevOps. Its main objective is to show you exactly why your application is running slowly or breaking in production. The benefit is that once you know the problem, you can fix the issue as quickly as possible. FusionReactor has a number of capabilities that allow you to gain insight into all kinds of different production issues. This blog will introduce you to FusionReactor Production Debugger. This enables you to interactively debug your application in production with almost zero performance impact and without affecting more than a single thread.

An exception is going to be thrown in by trying to find the length of a string which has not been initialized. Once this is run, we will see the error in the Error History view in FusionReactor.

Finding The Error

So, let’s take a look at the error first of all. To do this, we just click on the Error link. This brings us into the Error Tab, and we can see the Stack Trace that was generated when this error was thrown.

The class/method where the error occurred is shown at the top of the stack frames. Clicking on this method will instantly decompile it and FusionReactor highlights the line in the code which actually triggered the null pointer exception. If you click on a line, it’s highlighted in red, to indicate that a breakpoint has been set.

Run the application once again. When we do this, we can see that it doesn’t complete and the tab is spinning. When we go back into FusionReactor, we can see the Debug icon in the window banner – this denotes that one of our trigger points has fired and we can intercept it by clicking on the icon.

By clicking on the Debug Icon, FusionReactor shows us the thread which generated the breakpoint.

Debugging In Production

Now let’s debug it in production by clicking on the debug icon.

We’re shown the IDE style debugger window and we can see the actual code where the trigger point fired. It’s important to note here, that we entered the path to your code repository into FusionReactor.

We can see the code, showing the line where the breakpoint point fired. We can see the stack frames, at the lower Left Hand Side of the screen. In addition, we can see all the scope variables for any point in the stack.

The variable ARG is set to NULL – so this is going to be modified and then RESUME execution to quickly see if this fixes the problem.

When we RESUME execution the page runs to completion.

There you have it – we debugged our application directly in production. Note that we didn’t have to restart, change any code or redeploy our application. Everything is managed by FusionReactor in the browser.

So this was a quick demonstration of FusionReactor’s production debugger, which will allow you to debug anything in Java and is available in FR Ultimate and FR Developer Editions.