Break on variable value change in Android Studio 1.1.0?

后端 未结 4 1299
傲寒
傲寒 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:29

    Add a Kotlin Field Watchpoint by clicking on the space next to the line number for the field declaration in Android Studio. Select Kotlin Field Watchpoint from the Set Breakpoint menu. You will now get a breakpoint whenever that value changes.

提交回复
热议问题