Debugging not working in a service class ?? what can cause this issue?
All of a sudden I am not able to debug anything that i am doing in a service even though开发者_开发百科 i put breakpoints all over. but logging shows that all the lines are getting executed. Can someone tell me what could be causing this issue. I am using eclipse and i have set to "Build automatically".
Do you have an Activity
which is launched at the beginning of your application?
If not you have to manually activate the debug on your process by using the DDMS tool in Eclipse.
In DDMS -> Devices
, check your process (the line contains the package name of your app), select it and then click on the debug button. A debug icon will appear near your process, then you should be able to use breakpoints in your Service
.
If you are using a Runnable try placing this in the run() method:
android.os.Debug.waitForDebugger();
精彩评论