What is the significance of
android.os.Debug.waitForDebugger();
I am aware that we [sometimes] need to do this in order to debug a Service, but my question is:
- WHY do we have to do this?
- Why does this method exist? What other purpose does it serve?
- What does it mean to attach a debugger to a process, and why do we have to do this? Why does a
Servicehave to be debugged in this way, and not anActivityorBroadcastReceiver?
References:
2. A proper way to Debug a Service in Android Studio?.
3. Breakpoint in service not working.
4. How to debug an Android Background Service?.
6. Configure on-device developer options.
from Android Service - why wait for debugger and then attach debugger to process?
No comments:
Post a Comment