The bug was not in the Java code
When something breaks, the first thing most of us do is look at our own code. I do it too. But there are bugs you will not find in the Java code no matter how many times you read it.
A database connection, a Docker image, an environment variable, a character set, a network timeout or the response another service returned can look like a Java exception for hours. In the application itself there is nothing wrong at all.
A stack trace does not tell you everything
Seeing an exception is not the same as finding the cause. The stack trace shows me where the problem surfaced. The cause is something I still have to go and find.
A problem coming from the database can surface as an exception in the application layer. Something wrong in the connection pool can appear on a repository call. A network problem can arrive as an exception from a Feign client.
So while debugging I now try to ask less “where did this error occur?” and more “which layers did this error pass through to get here?”
Debugging is engineering too
I do not think being a good developer is measured only by writing new features. Working out calmly what an existing system is actually doing is a large part of the same job.
Sometimes the best fix is not more code. It is proving where the problem is not.