getting value of method parameters while the program is running

java, profiling

Solution

In you case you should use AOP. Wrap your method with custom code and log all its invocations. In one project we used AspectJ to log method execution time for profiling purposes.

Problem

I need to figure out how to see the values of a java method while the program is running. I can't change the code which is running, and I don't want to block the running of the code (so using debug mode in eclipse is off the table). I just want to tell a profiler, or something similar, to print all the parameters a specific method receives each time it is called. Is there any way to accomplish this? Thank :)

Original source