Break on variable value change in Android Studio 1.1.0?

后端 未结 4 1359
傲寒
傲寒 2021-02-03 22:58

I know I could set a breakpoint at every line where my code changes the variable, but is there an option such as right-clicking a variable (to \"Add to Watches\") that would sto

4条回答
  •  我寻月下人不归
    2021-02-03 23:32

    You can break on value changes of some variables in Android Studio 1.1.0.

    Android Studio calls them 'Java Field Watchpoints'.

    From the breakpoints windows, (Run -> "View breakpoints...") or Ctrl+Shift+F8, you can add "Java Field Watchpoints" from the plus in the top left corner, and then select your class and variable.

提交回复
热议问题