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.
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.
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.
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.
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.
once a breakpoint has been hit you can step over (f6
) or step into (f5
) (check the Run menu for more commands).
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With