I was wondering if something exists (in Java world) able to take an snapshot of the JVM current state with the following features:
You may want to look into the work that NetBeans has done regarding automated use logging: http://wiki.netbeans.org/UsageLoggingSpecification.
As for dumping out local variables, I would imagine that you could simply use a debugger, such as the one that bajafresh4life mentioned.
I give a look to JavaFrame and it seems a good starting point. Just install Apache Ant, do ant
in the javaframe directory and launch the test suite (inside test directory) with:
LD_LIBRARY_PATH=../build/native/ java -agentlib:frameintrospect -classpath ../build/classes/:. org.thobe.frame.Test
It does not get any local variable but it tries. So, as I said, it can be an starting point. I hope to get further about its usage, but no time and no documentation (there are lots of projects named JavaFrame) are bad circumstances.
Maybe some day it can be done again. Yes, again. There was Cajoon, it looked promising and shiny but its website is down and there is no trace of any downloadable jar to try.
Thanks to everybody!
PD.: Just for reference, some links I found while researching:
Not sure if this is viable in a production environment, but there's the Omniscient debugger:
What if your debugger could go "go backwards in time?" Would that make debugging easier? By simply recording all variable assignments, it is possible to do essentially this. This is the underlying idea for omniscient debugging. The amazing part is that significantly large programs can be debugged in this fashion -- Ant, JUnit, the debugger itself.
http://www.lambdacs.com/debugger/
Maybe it could be done with AspectJ?