How can we debug what happened when an exception was thrown at a later time?
We've got a production app written in Java that randomly throws an exception, which we can catch and log on the server. We'd like to debug this to see what's happening, as the logs aren't revealing much information.
And by debug I mean step into a debugger like Eclipse or IntelliJ's debugger and walk through the code for what happened when the exception was thrown, complete with data being passed to methods and local variables, etc.
So I'd like to have a dump of some sort saved whenever this happens, and then be able to load that dump in some tool to debug it after the fact.
So I'd prefer solutions that:
- Can create a dump file from code without adversely affecting our production app
- Can be analyzed using a GUI tool like Eclipse's debugger, for example.