debugging - Using IntelliJ idea debugger attach android service or activity at the first beginning? -
i got android project build via ant commandline workflow, edit/debug intellij idea.
i attach debugger service or running activities when apps running. want set breakpoint beginning of service initialize flow, make app restart , keep debugger attached, don't know how achieve it.
to debug windows program, windbg's open executable
work, android apps?
update:
i got service in app, i'd want make service wait debugger. has own process android:process=":service"
. how can achieve this?
maybe solution add these code service oncreate function, when want debug it?
android.os.debug.waitfordebugger();
on phone go developer options -> select debug app, , select app. then, check "wait debugger". when start app, popup open "waiting debugger attach".
after that, attach debugger in intellij.
p.s. not sure how in ant, maven, specify "wait debugger" when running build.
Comments
Post a Comment