Debugging an Android Thread / Service
Trying to debug an Android application recently, Eclipse wasn’t stopping on my breakpoints following an asynchronous / threaded API call.
This single line of code solved my problem:
android.os.Debug.waitForDebugger();
This will cause the Android Debugger to attach even after launching the application normally.
Hope this helps!
About this entry
You’re currently reading “ Debugging an Android Thread / Service ,” an entry on Public Static Droid Main
- Published:
- 10.8.11 / 4am
- Category:
- Uncategorized
No comments
Jump to comment form | comments rss [?] | trackback uri [?]