How to put a watch (see how a variable is modified) in Android Studio?

后端 未结 2 1072
逝去的感伤
逝去的感伤 2020-12-08 20:07

I don\'t know how to use a watch in Android Studio. I want to see how the value of a variable modifies through debugging. Does anyone know how to do this?

2条回答
  •  醉梦人生
    2020-12-08 20:52

    Assuming you have the debug tabs selected:

    If you can't find the Watches View, it might be hiding in a few spots.

    Check the right side:

    If its not there, check the left side of the Variables tab:

    And if you don't find it in those places, then you can right click one of the variables at a breakpoint and choose "Add to watches" (as described in the accepted answer). After that the Watches View should either appear or be in one of the places I described above.

提交回复
热议问题