What's Wrong with Debugging in Eclipse on Android

What's wrong with debugging in Eclipse on Android?

Yes, you've missed one of the very important plug-ins for Eclipse called "LogCat". It catches all the debugging logs that your Android program gives, whether it's running on the Emulator or a real phone. The latter obviously requires that the phone be plugged in to the computer, and less-obviously, the setting in Application -> Development -> Enable USB Debugging be enabled.

The LogCat messages give you the full breakdown of what caused the error, including the line number. To open LogCat in Eclipse, go to Window -> Show View -> Other -> Android (one of the folders in the list) -> LogCat. Then dock the LogCat window somewhere where you can see it easily, and Eclipse will remember that location and open it up again next time your start it.

(Sometimes LogCat and the Emulator get disconnected from each other. The simple way to fix that is just to close Eclipse and the emulator, then restart them both.)

Eclipse Debugging Android doesn't work

Does the thread list show up in the Debug perspective when you start the app? If not, then Eclipse's debugger is not property attached to the phone/emulator.

Make sure you have android:debuggable=true in the Manifest. The latest version of the Eclipse ADT plugin should do this for you, but I've seen a few cases where it didn't work as I expected.

Eclipse (Android): When clicking 'Run'/'Debug' nothing happens

right click you project->run as -> run configuration, check whether launce default activity is selected, and in target tab check "always prompt to pick device"

Android Eclipse debugging not working properly

Chances are that your last source code was not correctly compiled and installed on the device (you may have unintentionally unchecked Build automatically option). Some things you can try:

  • Do a full clean of your project.
  • Uninstall application on device.
  • Reinstall and run in debug on mode again.

Eclipse - Android - Cannot debug

You can attach the debugger to an existing process in Eclipse by choosing the process from the device window and clicking on the attach debugger button.
See this post for further details:
How to attach back the Android emulator to ADB?

Android debugger in Eclipse IDE is not working properly

You need to attach the android source to eclipse - there's a guide here ( : http://android.opensourceror.org/2010/01/18/android-source/

Also according to this question there are a few other ways too (it look slike the plugin isn't being updated anymore, but http://johnsenf.blogspot.com/2011/04/android-sources-in-eclipse.html looks good)



Related Topics



Leave a reply



Submit