在Android Studio 1.1.0中中断变量值更改吗? [英] Break on variable value change in Android Studio 1.1.0?

查看:91
本文介绍了在Android Studio 1.1.0中中断变量值更改吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以在代码更改变量的每一行设置一个断点,但是是否存在诸如右键单击变量(到添加到监视")的选项,当变量更改值时该选项会停止吗?/p>

我认为C ++具有此选项. 查看此内容

.

还有Eclipse? 参见此内容.

这是在AS中实现的吗?

解决方案

您可以中断Android Studio 1.1.0中某些变量的值更改.

Android Studio称它们为"Java字段观察点".

从断点窗口(Run -> "View breakpoints...") or Ctrl+Shift+F8, 您可以从左上角的加号添加"Java字段监视点",然后选择您的类和变量.

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 stop when a variable changes value?

I think C++ has this option. See this.

And Eclipse? See this.

Is this implemented in AS?

解决方案

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.

这篇关于在Android Studio 1.1.0中中断变量值更改吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆