简体   繁体   English

如何调试外部JAR文件

[英]How can I debug external JAR files

I'm using some apache libraries in my code. 我在我的代码中使用了一些apache库。 At the moment I'm hitting a variety of problems that I need to debug. 目前我遇到了需要调试的各种问题。 However the problem is when I pass data into one of said Apache libraries, when I try to step into the method call using netbeans it simply does the processing in the background and doesn't step into the code I want to view. 然而问题是当我将数据传递到所述Apache库之一时,当我尝试使用netbeans进入方法调用时,它只是在后台进行处理而不会进入我想要查看的代码。

Does anyone know how I configure the IDE so that I can debug the apache code as well? 有谁知道我如何配置IDE,以便我也可以调试apache代码? Right now I just associate the JAR's with the project by adding them as libraries. 现在我只是将JAR与项目相关联,将它们添加为库。

You need to attach a source jar (eg commons-lang-2.4-sources.jar) to your dependency, instructions here 您需要将源jar(例如commons-lang-2.4-sources.jar)附加到您的依赖项, 此处的说明

I should also recommend using Maven2 to manage your project dependencies, I've not used Netbeans for at least 5 years, but both Eclipse & IntelliJ have Maven plugins which will import all your dependencies and link them to sources/javadoc jars automatically. 我还应该建议使用Maven2来管理项目依赖项,我至少已经使用Netbeans 5年了,但是Eclipse和IntelliJ都有Maven插件,它会导入所有依赖项并自动将它们链接到sources / javadoc jar。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM