when I debug my android app using emulator, the stacktraces and error messages are shown in Eclipse's Logcat.
However, when I debug on my physical android device, when app crashes there is no stacktrace shown in eclipse. Is there anything i need to configurate in order to get stacktrace when debugging on physical device??
-
Do you see the regular log messages in the logcat output? If not, there should be a "device selection" view or something that shows your physical device.Rob I– Rob I2012-12-22 00:44:28 +00:00Commented Dec 22, 2012 at 0:44
Add a comment
|
2 Answers
There could be many reasons for this:
1) Did you install USB driver for your phone?
2) Did you enable USB debugging?
Settings -> Application -> Development -> USB debugging
3) Check if your device is detected. In command line run:
adb devices
It should be listed there and it shouldn't be offline. adb doesn't detect the phone sometimes. You can try to restart it with:
adb kill-server
adb start-server
4) Sometimes, simply unplugging/re-plugging the USB cable works.
5) In some situations the phone is the problem, restarting it helps.
2 Comments
MrZander
Also, the USB driver is needed.
Tyler Shao
i think i have properly setup everything you mentioned. right now i am able to debug my app on phisical device. for example, i am able to set breakpoint in eclipse and the breakpoint is detected when debugging on device. However, when my app crashes due to whatever reasons, the eclipse Logcat dosent display any stacktrace, so that i am unable to know the cause of the app crash.