سؤال

I need to debug a service after boot. The problem I have is that I don't see the debugger after calling

android.os.Debug.waitForDebugger();

If I open the application through the debugger all works fine so I need the service to start running after boot and then to attach the debugger.

Thanks,

Simon

هل كانت مفيدة؟

المحلول

waitForDebugger freezes your app and waits for debbuger to be connected. You should open your IDE find your process and connect to it with a debugger (also you should set a break point if you need before connecting). Debugger wont connect by itself. google 'android.os.Debug.waitForDebugger()'

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top