How do you debug Android IntentService?

I use Eclipse and have an emulator running Android 2.1 and my IntentService. I would like to execute my overridden function onHandleIntent (). I set a breakpoint in the first expression of the function, which is the context context = getBaseContext () ;. When this intention is called, the program simply fails and does not proceed to debugging in Eclipse.

+3
source share
2 answers

Add a android.os.Debug.waitForDebugger();statement before the breakpoint in your intentservice code.

It worked for me.

+9
source

, , , .

. .

+1

Source: https://habr.com/ru/post/1749651/


All Articles