Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Debug Android application line by line using Eclipse?

I am familiar with VS.Net IDE & it has a lot of support for debugging. But the android development is something new for me. I am using the Eclipse IDE. I was wondering how to debug the android application line by line just like we can do in .Net IDE?

Currently i am using the log window, but i am not happy with it. I need suggestion from the expert guys, what is the best way to debug the Android application using Eclipse?

Great thanks for your valuable time & help.

like image 400
Yaqub Ahmad Avatar asked Dec 18 '11 12:12

Yaqub Ahmad


People also ask

How do I step through a program in Eclipse?

Simply put, you can run your code in Debug Mode by pressing only F11 or clicking that little bug on the top of the screen. Use F5 to trace into, F6 to step over, CTRL-SHIFT-B to set/remove breakpoints.

How do I debug third party apps on Android?

To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or Debug APK from the menu bar. In the next dialog window, select the APK you want to import into Android Studio and click OK.

How do I run debugging in Eclipse?

Starting the Debugger. To debug your application, select a Java file with a main method. Right-click on it and select Debug As Java Application. If you started an application once via the context menu, you can use the created launch configuration again via the Debug button in the Eclipse toolbar.


2 Answers

  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).

like image 168
P.Melch Avatar answered Oct 14 '22 03:10

P.Melch


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

like image 28
Yaqub Ahmad Avatar answered Oct 14 '22 01:10

Yaqub Ahmad