Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android device disconnects from debugger a few seconds after breakpoint is hit

This has been plaguing me for a few days now. Any time I try to use a breakpoint to debug into anything other than an activity (background service, broadcast receiver, input method) my breakpoint will be hit normally, but then about five seconds later the device will terminate the process and disconnect from the debugger. It isn't enough time to gather any meaningful information so debugging has proven extremely difficult.

like image 789
chefgon Avatar asked Nov 09 '10 20:11

chefgon


1 Answers

I have just had the same problem

What happened for me was that I was in the middle of debugging when my phone (a ZTE blade) recieved a call. I took the call and when I came back to debugging again afterwards, I found that no matter what code I put on one particular line (probably the one where I had paused / had a break point when I recieved the call), the activity crashed (silently / without error message) when it hit that line.

After some messing around, I found if I added and removed a breakpoint on the offending line and added another in a different method later on, that the new breakpoint paused and after running the app through once, the whole thing was fine

like image 68
James Coote Avatar answered Nov 15 '22 13:11

James Coote