[转]eclipse调试:关联源码

Android项目关联其他工程,无法进行源码级别的调试,提示:The Jar of this class file belongs to container ‘Android Dependencies’ which does not allow modifications to source attachments on its entries

解决办法:

去Debug视图下,右击线程,选择:

[转]eclipse调试:关联源码_第1张图片
debug-mode-right-click-thread-edit-source-lookup_thumb.png

然后去添加:

Default->Add->Java Project

[转]eclipse调试:关联源码_第2张图片
edit-the-source-lookup-path-default-add-java-project-ok_thumb.png
[转]eclipse调试:关联源码_第3张图片
choose-related-source-code-project-then-ok_thumb.png
[转]eclipse调试:关联源码_第4张图片
added-usb-serial-project-then-ok_thumb.png

然后需要注意的是:

当前Class File Editor界面中,并不会变化,还是不能同步看到源码。

但是:

继续调试,或者说,重新调试,再去单步F5执行的话,就可以看到源码了:

[转]eclipse调试:关联源码_第5张图片
then-redo-debug-f5-can-into-source-code-for-usb-serial-prober_thumb.png

转自:
【已解决】Android的ADT调试期间出现提示:The Jar of this class file belongs to container ‘Android Dependencies’ which does not allow modifications to source attachments on its entries

你可能感兴趣的:([转]eclipse调试:关联源码)