Android的调试,怎么样? [英] Android Debugging, how?

查看:110
本文介绍了Android的调试,怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,所以我终于拼凑足够的工作部件为我的应用程序,它只是普通的老拒不现在做任何事情。我了解如何使用logcat的,但也差不多了。

Ok so I've finally cobbled enough working parts into my app that its just plain old refusing to do anything now. I understand how to use logcat, but that is about it.

目前的主要问题是,我得到的错误

The main problem at the moment is that I get the error

有关HistoryRecord然后我的包活动空闲超时

Activity Idle Timeout for HistoryRecord then my package

我需要学习如何做更好的调试。另外,如果任何人都可以建议的东西,我应该为这个错误做,请让我知道。
我认为它是与与数据库的交互。

I need to learn how to do better debugging. Plus if anyone can suggest things I should do for this error please let me know. I think its something to do with the interactions with the database.

干杯

编辑:

什么IDE您使用的,如果有的话?
  日食与Android工具有
  适度调试好设备;
  设置断点和调试了。

What IDE are you using, if any? Eclipse with Android tool has moderately good debugging facilities; set a breakpoint and debug away.

我使用Eclipse
我知道断点,但不是他们的真正使用。我会在哪里设置他们的这一错误?

I am using Eclipse And I know of breakpoints, but not their real use. Where would I set them for this error?

我用PHP错误的位置告诉你一个具体线路来看看有没有办法在Eclipse做呢?

I am used to PHP where errors tell you a specific line to look at is there a way to do this in Eclipse?

推荐答案

在Eclipse中,如果你右击空白处旁边的code - 容易开始的地方可能是在你的的onCreate 方法 - 您可以选择的切换断点的。这将在该位置设置一个断点。

In Eclipse if you right click in the margin next to your code - easy place to start is probably in your onCreate method - you can choose to Toggle Breakpoint. This will set a breakpoint at that location.

现在,在Eclipse中选择运行 - >调试AS-> Android应用程序。

Now, in Eclipse choose Run->Debug As->Android Application.

这将运行在模拟器您的应用程序,并停在断点处运行你的应用程序。此时,您可以通过使用行F6相信步骤通过你的code线。

This will run your app in the emulator and your app with stop running at your breakpoint. At this point you can step thru your code line by line using F6 I believe.

一旦你打的断点和你的code暂停时,使用这样的指南的 http://www.ibm.com/developerworks/library/os-ecbug/ 将突出所有不同的东西,你可以在这一点上做的。

Once you've hit the breakpoint and your code is paused, use a guide like this http://www.ibm.com/developerworks/library/os-ecbug/ which will highlight all the different things you can do at that point.

这篇关于Android的调试,怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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