Can I find out the return value before returning while debugging in Intellij?

On IntelliJ IDEA 2016.3: it’s hidden inside the cog button of the debug panel. Ensure Show Method Return Values is checked.

IntelliJ IDEA 2016.3 "Show Method Return Values"

Use the debugger to break somewhere inside the function whose return value you’d like to see.

step into function

Step out of the function (or step over until you escape):

step out

Observe that the return value appears in your variables:

observe the return value

Leave a Comment