由意图过滤器启动时调试应用程序 [英] debugging app when launched by intent filter

查看:70
本文介绍了由意图过滤器启动时调试应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常通过按Eclipse中的小错误"图标来调试应用.

I normally debug my apps by pressing the little "bug" icon in Eclipse.

但是现在我在清单中插入了一个这样的意图过滤器:

But now I have inserted an intent filter like this in my manifest:

 <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />

插入USB电缆后,应用程序现在会自动启动-我无法对其进行调试.在任何断点处都没有停止.

While the app launches now automatically when the USB cable is plugged in - I cannot debug it anymore. There is no stop at any breakpoint anymore.

通过意图启动时如何调试应用程序?

非常感谢!

推荐答案

解决方案是这样的,由于启动了意图过滤器,因此在应用程序启动时会出现延迟.然后,只要在其中可见应用程序,便运行到调试窗口,附加应用程序进程,然后中提琴,您可以像以前一样调试应用程序

The solution is like this, put a delay in the app when it starts due to the intent filter launch. Then run to the debug window as long as the app is visible there, attach the app process and viola you may debug the app like before

这篇关于由意图过滤器启动时调试应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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