SampleSyncAdapter断点不工作 [英] SampleSyncAdapter Breakpoints Not Working

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

问题描述

我使用Eclipse来学习如何在SampleSyncAdapter示例工作。我不能让我的断点工作。我设置在多个位置的断点,但没有被击中。例如,AuthenticatorActivity.onCreate()从来没有得到的调用。任何人都知道为什么吗?

I'm using Eclipse to learn how the SampleSyncAdapter example works. I can't get my breakpoints to work. I set a breakpoint in multiple locations but none get hit. For example, AuthenticatorActivity.onCreate() never get's called. Anyone know why?

感谢。

推荐答案

执行的SyncAdapter线程发生在衍生的后台进程,而不是在应用程序本身的过程,就是你有你的Java调试器附着。

The SyncAdapter thread of execution occurs in a spawned background process, not in the process of your application itself, which is what you have your java debugger attached to.

简单而丑陋的方式:登录()是你的朋友

Simple and ugly way: log() is your friend.

更好的办法:首先看调试服务并发现,如果一个需要适应这种情况下,

Better way: Start by looking at Debugging a service and find if that needs to be adapted for this case.

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

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