我正在使用eclipse作为IDE,并且已经编写了一些小程序,但是现在我想调试它们,以便可以检查控制流。
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">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.