Search code examples
androidintellij-ideaadb

Start debugging Android application right after reboot


Helo !

I am working right now with an application that uses BOOT_COMPLETED receiver.

So if I want to debug this application with some breakpoints in its class, I have to reboot my phone and connect to it in the proper time, but I am always too late.

Have you got any better solutions how to debug my application exact when it starts its lifetime with device reboot case ?

Thanks !


Solution

  • You can wait for a debugger - Debug.waitForDebugger()