How to Debug Android application line by line using Eclipse?

Solution 1:

  1. either start the app by right clicking on the project and select Debug As->Android Application or by running it normally and later in the DDMS perspective select the running app in your devices pane and click on the green bug.

  2. once a breakpoint has been hit you can step over (f6) or step into (f5) (check the Run menu for more commands).

Solution 2:

Well i found some articles which guides how to debug using Eclipse.

1- Free video tutorial will teach you how to use the Eclipse Java Debugger

2- Debugging with the Eclipse Platform

3- 5 Tips for Debugging Java Code in Eclipse

4- Java Debugging with Eclipse - Tutorial

Solution 3:

Put a breakpoint on the line you want to start debugging from, then Run the Application in Debug mode, the app will hit the breakpoint and then you can go through it just like in VS.

Solution 4:

I just set up the Eclipse included in the Android Development Tools (ADT), the adt-bundle-mac-x86_64-20131030 version. Setting the property in the manifest file gave me a warning saying that it would be better to set up different Run and Debug configurations. It turns out that I simply needed to create a debugging profile:

  1. Run >> Debug Configurations...
  2. Click "Debug" to take the defaults

Now you can go to Run >> Debug to run on the device. (Assuming that the device has debugging enabled, of course)

If you are an Eclipse or ADT developer and are reading this, I strongly suggest that Eclipse create a debugging configuration by default.