使用DDMS + Android Mob进行调试 [英] Using DDMS + Android Mob for debug

查看:114
本文介绍了使用DDMS + Android Mob进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的手机安装之后,我试图运行我的新应用程序,但我会阅读这个 -

I was trying to run my new app after installing it on my mobile but instead i get to read this-

The Application MyApp has stopped unexpectedly.Plz try again.

googling一段时间后,我知道我可以调试我的应用程序使用DDMS,所以我连接我的Android Mobile在我的Windows中运行带有2.2.2的ddms,但我可以走多远。

After googling for some time i came to know i can debug my app using DDMS, so i connected my Android Mobile running with os 2.2.2 with ddms in my windows lappy but that how far i can go.

现在我想知道如何检查我的应用程序的代码正在导致此问题

所以plz提供了如何做的分步指南。

Now I want to know how i can check which step in my application's code is causing this problem
so plz provide step-by-step guide on how to do that.

推荐答案

首先选择调试透视图:

然后在需要的地方设置断点

Then set Breakpoints at places you want:

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

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

然后在Debug透视图中,您可以通过按 F8

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

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.

这篇关于使用DDMS + Android Mob进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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