我如何调试 android 服务 - 扩展服务类的活动 -
同事们,
我如何调试扩展服务类的活动? 它不能与 eclipse 调试工具的常规断点一起使用! 我知道您可以使用日志标签,但这真的是唯一的调试工具吗?
这是一些代码,可以发布这个问题
public class HUJIDataCollectionService extends Service {
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
}
colleagues,
how can i debug an activity that extends the service class?
Its not working with the regualar breakpoints of the eclipse debugging tool!
I know that you can work with logtags but is this really the only debugging tool??
heres a little code sniped to be able to post this question
public class HUJIDataCollectionService extends Service {
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的服务是否在清单中声明为在与主应用程序进程不同的进程中运行?例如:
如果是这样,您将需要在 Eclipse 中创建一个特殊情况的调试配置,以使调试器附加到该进程。查看这篇文章以获取分步说明:
http: //blog.doityourselfandroid.com/2010/12/07/debug-remote-android-proces-eclipse/
Is your service declared in the manifest to run in a seperate process to your main application process? For example:
If so, you will need create a special case debug configuration in Eclipse to get the debugger to attach to that process. Check out this article for step by step instructions:
http://blog.doityourselfandroid.com/2010/12/07/debug-remote-android-proces-eclipse/