断点服务无法正常工作 [英] Breakpoint in service not working

查看:184
本文介绍了断点服务无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个断点添加到一个单独的线程运行的服务。无论在哪里我把断点在服务上,他们总是被忽略。

I am trying to add a breakpoint to a service running on a separate thread. No matter where I place the breakpoint in the service, they are always ignored.

我相信,因为我看到的 Log.e 在logcat的服务正在运行。我调试模式也正确用作应用作品的主线程断点任何

I am sure that the service is running as I see the Log.e in the logcat. My debug mode is also correctly used as any breakpoint in the main thread of the app works.

我缺少的东西吗?是不是在一个单独的线程支持服务的调试模式?

Am I missing something? Is debug mode not supported for services in a separate thread?

我刚刚更新Eclipse和Android SDK工具的最新版本今天。

I just updated Eclipse and Android SDK tools to the latest versions today.

我的设备上测试应用程序。

I am testing my application on a device.

推荐答案

android.os.Debug.waitForDebugger()的伎俩。 c您要调试$ C $的行之前添加这一点。

The android.os.Debug.waitForDebugger() did the trick. Add this before the line of code you want to debug.

这篇关于断点服务无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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