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

前端 未结 4 1656
清酒与你
清酒与你 2020-12-12 15:58

With:

Object method(){
    ...
    return /* some complex expression */
}

Is there a way I can see what value will be returned while debugg

4条回答
  •  清歌不尽
    2020-12-12 16:40

    This was asked a while ago, but I use a different method when I want to handle this situation.

    When debugging, you can mark the expression (in your case, the expression right after the "return") and hit CTRL + ALT + F8 (Quick Evaluate Expression). IntelliJ will pop up a little window showing you the value that will be returned.

提交回复
热议问题