How can I bind sources of 3rd party jar to eclipse for debugging when jar is not on the class path

匿名 (未验证) 提交于 2019-12-03 01:09:02

问题:

I am using a 3rd party, open-source jar in my application. I develop the application in Eclipse. The jar is actually not on the classpath of the application, it is dynamically loaded by dependency injection framework (OSGI Felix here).

I have sources of the jar, but I do not want to build it.

How to to bind the sources to the jar in the Eclipse, so that I can put breakpoints and debug through code of this jar?

I think that differs if the jar is on the classpath, so I stress this fact.

回答1:

When you step into your method in Eclipse, if you don't have the source code of the jar you'll end up with this editor window:

Just click the Attach Source.. button, and then select your jar that contains the source code. You'll be able to put break points and step inside the methods.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!