With a recent patch, Eclipse can now show you the return value of a method during a debug session.
For years, when I was debugging and I needed to see the return value of a method, I would change code like:
String retVal = function(); return retVal;
And then step through the code and inspect the value of “retVal”.
Recently [September 2016] a patch was merged to support this feature. Now when you return from a method, in the upper method, in the variable view it shows the return value of the previously finished call:
As a side note, the reason this was not implemented sooner is that the Java virtual machine debugger did not provide this information until Java 1.6.
If your version of Eclipse doesn’t yet have that feature, try downloading a recent integration or nightly build.