Debugging Java in production with FusionReactor

preview_player
Показать описание
Debugging Java in production with FusionReactor
FusionReactor’s Production Debugger – JSP Example.

FusionReactor is a developer-focused production-grade monitoring tool. It’s designed for software developers, technical support, and Devops.

FusionReactor’s 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 which allow you to gain insight into all kinds of different production issues – in this video, I’ll introduce you to FusionReactor’s Production Debugger, which enables you to interactively debug your application in production with almost zero performance impact and without affecting more than a single thread.

For this video, I’m going to throw an exception by trying to find the length of a string which has not been initialized.

Once I’ve run this, we will see the error in the Error History view in FusionReactor.

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.

When we click on the Debug Icon, FusionReactor shows us the thread which generated the breakpoint.

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

Now 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.
I can see the code, showing the line where the breakpoint point fired.
I can see the stack frames, at the lower Left Hand Side of the screen.
I can see all the scope variables for any point in the stack.

I can see that the variable ARG is set to NULL – so I’m just going to modify this variable 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.
Рекомендации по теме
Комментарии
Автор

Wait, 2020 java devs still need to debug their code? That explains this year's issues.

bb