java - Eclipse java调试: source not found

标签 java eclipse debugging

在 Eclipse 中调试 Java 应用程序时,我在两种情况下收到“未找到源”错误:

  • 进入不同项目中已导入的文件
  • 进入已安装的 Maven 存储库中的文件

文件在那里,但 Eclipse 不会进入其中,而是显示一个“附加源”按钮

我尝试附加(这打开了一个对话框来定义变量?!)并且 Eclipse 确实跳转到该文件,但调试器无法检查那里的任何变量。此外,手动附加每个依赖项的源代码也是不切实际的,因为在我的例子中,有数千个依赖项文件。

为什么会发生这种情况,如何解决?

最佳答案

只需 3 个步骤即可配置 Eclipse IDE:

Note: After updating the Source Lookup paths, you'll have to stop and restart your debug session. Otherwise, the file with the missing source will continue to show "missing source".

编辑源查找 选择“编辑源查找...”命令 [ 编辑源查找 ] 打开“源路径对话框”,该对话框允许您更改所选调试目标的源查找路径。

enter image description here

enter image description here

enter image description here

重要 在最后一步之后重新启动 Eclipse

关于java - Eclipse java调试: source not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21590156/

相关文章:

java - 对 Apache Mina 总带宽进行基准测试

Java HotSpot(TM) 64 位服务器虚拟机警告

java - Spring 和 Angular JS

Eclipse 中的 Java/C++ 项目管理?

spring - 使用 Linkedin 的 Spring Social 将 LinkedIn JS API token 交换为 REST token

java - Google 控制台显示 0 个支持 Android Wear 的设备

java - 如何将库导入/添加到 Spring STS 中?

eclipse - Eclipse 在运行 Web 应用程序时如何工作

c - 获取 C 程序修改的所有内存位置的日志

ios - 我如何解决 'NSUnknownKeyException' ... setValue :forUndefinedKey:]: . ..不符合键值编码