当jar不在类路径上时,如何将第三方jar的源绑定到eclipse进行调试 [英] How can I bind sources of 3rd party jar to eclipse for debugging when jar is not on the class path
问题描述
我有jar的来源,但是不要建立它。
如何将源绑定到Eclipse中的jar,以便我可以通过该jar的代码来进行断点和调试? / p>
如果jar在类路径上,我认为是不同的,所以我强调这个事实。
当您在Eclipse中进入您的方法时,如果您没有该jar的源代码,那么最终将会出现此编辑器窗口:
只需点击 Attach Source ..
按钮,然后选择包含源代码的jar。您可以在方法中放置断点和步骤。
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.
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.
这篇关于当jar不在类路径上时,如何将第三方jar的源绑定到eclipse进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!