Home » Tag Archives: Debugging

Tag Archives: Debugging

Debugging Java Streams with IntelliJ

Streams are very powerful and can capture the gist of your intended functionality in just a few lines. But, just as smooth as they are when it all works, just as agonizing it can be when they don’t behave as expected. Learn how to use IntelliJ to debug your Java Streams and gain insight into the intermediate operations of a ...

Read More »

Why debugging in production is so tempting?

Debugging in Production Why debugging in production is so tempting? In one of my first jobs, one of the tasks I had was to fix a bug which used to occur from time to time in a very complex production system. That is easy! – I thought. I will reproduce the same situation in my development environment, find the broken ...

Read More »

Supercharged jstack: How to Debug Your Servers at 100mph

A guide for using jstack to debug live Java production servers jstack is like U2 – it’s been with us since the dawn of time, and we can’t seem to be rid of it. Jokes aside, jstack is by far one of the handiest tools in your arsenal to debug a live production server. Even so, I still feel it’s deeply underused ...

Read More »

Write an auto-debugger to catch Exceptions during test execution

Previously I have stated that there are some exceptions you would always want to keep an debugger breakpoint on for. This help prevents code rotting away without you noticing – sometimes masking a different problem. If you take this seriously then it is a good idea to extend this idea to you automated testing; but coming up with a comprehensive ...

Read More »

Hunting a Random Bug – A True Story

java-interview-questions-answers

A few weeks ago, I finished a bug hunt for the RapidFTR open source project, which took me three evenings. I thought it might be worth sharing the story of the hunt. This article will describe what I did. I will give an overview of my journey to actually find the root cause of what was going on. My goal ...

Read More »

Fixing Bugs that can’t be Reproduced

There are bugs that can’t be reproduced, or at least not easily: intermittent and transient errors; bugs that disappear when you try to look for them; bugs that occur as the result of a long chain of independent operations or cross-request timing. Some of these bugs are only found in high-scale production systems that have been running for a long ...

Read More »

Fixing Bugs – if you can’t reproduce them, you can’t fix them

‘Generally, if you can’t reproduce it, it’s almost impossible to fix’. Anonymous programmer, Practices of Software Maintenance, Janice Singer Fixing a problem usually starts with reproducing it – what Steve McConnell calls “ stabilizing the error”. Technically speaking, you can’t be sure you are fixing the problem unless you can run through the same steps, see the problem happen yourself, ...

Read More »

Debugging the JVM

In some (rare) cases you might find yourself in the situation that you managed to crash the JVM itself. I most recently managed this by setting the name of a ThreadGroup to null. In these cases it is useful to debug the JVM itself so that the crash can be located more precisely. Here are the steps to do it ...

Read More »