Android中的Spy / Watch变量(Eclipse) [英] Spy / Watch variable in Android (Eclipse)

查看:147
本文介绍了Android中的Spy / Watch变量(Eclipse)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很开心使用Eclipse开发Android。我正在问一个非常基本的问题:
可以在调试会话期间观看/间谍变量的内容? (有点像Visual Studio)



我知道这是一个相当跛脚的问题,但我无法自己弄清楚。



提前感谢



Gallien

解决方案

p>首先选择调试透视图:





然后在所需的位置设置断点





之后,通过 Debug As-> Debug Configurations ... 创建一个Debug配置,然后调试为 Android应用,如下所示:



然后在Debug透视图中,您可以追踪/观看按 F8 所需的变量:

就是这样,你也可以通过表达式查看表达式。如果未启用,请从:
窗口 - >显示视图 - >其他 - >调试 - >表达式


I am new to Android development with Eclipse. I am asking a very basic question : is it possible to watch / spy the content of a variable during the debugging session? (a bit like in Visual Studio)

I know It is a fairly lame question, but I couldn't figure it out myself.

thanks in advance,

Gallien

解决方案

First select Debug perspective as:

Then set Breakpoints at places you want:

After that create a Debug configuration via Debug As->Debug Configurations... and then Debug as Android Application as shown below:

Then in Debug perspective you can trace/watch value of your desired variable by pressing F8: That's it, you can also evaluate expressions through Expressions view. If it is not enabled select it from: Window->Show View->Other->Debug->Expressions.

这篇关于Android中的Spy / Watch变量(Eclipse)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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