同事,
如何调试扩展服务类的活动?
它不能使用eclipse调试工具的regular断点!
我知道你可以使用logtags,但这真的是唯一的调试工具吗??
这里有一个小代码被剪掉了可以发布这个问题
public class HUJIDataCollectionService extends Service {
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
}
最佳答案
您的服务是否在清单中声明为在主应用程序进程的单独进程中运行?例如:
<service android:name=".HUJIDataCollectionService"
android:process=":SomeOtherProcess">
</service>
如果是这样,则需要在eclipse中创建一个特殊的case调试配置,以使调试器附加到该进程。查看本文,了解分步说明:
http://blog.doityourselfandroid.com/2010/12/07/debug-remote-android-proces-eclipse/