How to debug android program

1. Go to Run -> debug configuration. Select your application and press debug.




2. Before running in debug mode, set the break points at all the places where it may be needed for your code.

3. Once you start debugging, the emulator may show a window showing “waiting for debug to progress” and it may prompt you to force close.

4. Don’t click on the force close button, because it will lead to end your application. Wait for that window to get closed automatically by itself.



5. Then your eclipse will get control and will ask you to switch the perspective view of your eclipse editor, here press yes to start debugging.



6. Once you press yes, it will open the debugging mode screen of the eclipse.



7. If you want to run it step by step, use F6 button. This will explore the line by line debugging.

8. If you want to skip to the next debugging point or want to run it completely, press F8 button.

Here check the android interview questions.