开发者

Debugging not working in a service class ?? what can cause this issue?

开发者 https://www.devze.com 2023-02-18 14:33 出处:网络
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 someo

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();
0

精彩评论

暂无评论...
验证码 换一张
取 消