You can try android.os.Debug.waitForDebugger() instead of the Thread.sleep().
If that doesn't work, please file a new bug. On Wed, Aug 19, 2015 at 8:25 AM, Artem Zinnatullin <[email protected]> wrote: > Hello, ADT team (yeah, again). > > We use multiple processes in our Android app and sometimes we need to debug > them. > > The problem is that we can not specify process(ses) to debug before launch, > so the only way to do it from Android Studio — launch the app and then > attach debugger to it, but to debug things like Application.onCreate we need > to put things like Thread.sleep() to be fast enough to attach the debugger. > > Is it possible to make an option in Android Studio to run the app with the > debugger, attached to particular or even all processes of the app? > > Related links: > > https://youtrack.jetbrains.com/issue/IDEA-64456 > https://code.google.com/p/android/issues/detail?id=65177 > > -- > You received this message because you are subscribed to the Google Groups > "adt-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
