Anuja
Anuja

Reputation: 1

debugging in android

I am using eclipse as the IDE and I have written small programs but now I want to debug them so that i could check the flow of control

Upvotes: 0

Views: 202

Answers (1)

Janusz
Janusz

Reputation: 189594

If you are using eclipse you can just set a breakpoint as in any usual Java Application and then do a right click on your project and select Debug as -> Android Application instead of Run as -> Android Application. Now Eclipse will connect the debugger to your emulator or phone and open the debugger once you are reaching the breakpoint.

If the breakpoint is not reached have a look at your manifest.xml file and be sure to mark your application as debuggable.

For that you have to add the attribute debuggable to your application tag.

<application
    android:icon="@drawable/logo"
    android:name="Name"
    android:label="@string/app_name"
    android:debuggable="true">

Upvotes: 1

Related Questions