使用java源代码调试Android库项目 [英] Debug Android library project with java source code
问题描述
我遵循以下教程 http://developer.android.com /guide/developing/projects/projects-eclipse.html
我有2个项目:启动项目和图书馆项目。大部分的源代码都位于库项目中。
and I have 2 projects : the starter project and the library project. Most of the source code is located into the library project
当我调试android应用程序时,当我将一个断点放到java中时,断点工作,但它跳入类文件位于Library项目文件夹(起始项目)中。
When I debug the android application and when I place a breakpoint into the java, the breakpoint work but it jump in the class file located in Library project folder (of the starter project).
我想停止在java代码中,所以我不必在源代码之间切换和编译代码等修改源码。是否可能?
I would like to stop in the java code, so I don't have to switch between the source and the compiled code and so modify the source. Is it possible ?
推荐答案
我:
(至少一次点击调试之后)
Here is what worked for me: (After having clicked debug at least once before)
- 在eclipse中打开调试视图(使用菜单顶部:窗口 - >显示视图 - >调试)
- 右键单击调试窗口编辑源查找中的一个活动
- 单击添加
- 选择Java Project
- 选中Android Library项目的框
- 按OK
- Open the debug view in eclipse (use the menu at the top: Window -> Show View -> Debug)
- Right click one of the activities in the debug window "Edit source lookup"
- Click "Add"
- Select "Java Project"
- Check the box for the Android Library project
- Press OK
这篇关于使用java源代码调试Android库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!