开发者

debugging in android

开发者 https://www.devze.com 2023-02-06 15:55 出处:网络
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 controlIf you are using eclipse you can just set a breakpo

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


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">
0

精彩评论

暂无评论...
验证码 换一张
取 消