在尝试设置断点时,我在Eclipse中得到这个奇怪的错误。

Unable to insert breakpoint Absent Line Number Information

我勾选了编译器选项的复选框,但运气不好。


当前回答

We have very useful information to solve this problem already, but in my specific case, the problem was that as I did an update to my project from the repository, new classes were generated with the compiled source from the newest code. The problem is that I forgot to change the versions of the projects in my POM files and as the breakpoints were set on the new code and the POM files were still pointing to old versions that were available on the JAR files of a previous compilation, the classes from the JAR files were chosen and not the classes from the new code.

在恢复中,为了解决这个问题,我只需要更新主项目的POM文件的版本,清理并重新编译源代码,最后刷新环境。我希望这能对其他人有用。

其他回答

从Spring AOP得到这个消息(似乎来自CGLIB库)。点击忽略似乎工作正常,我仍然可以调试。

我在Eclipse IDE中也有同样的错误。 但这似乎是一个可以忽略的错误。 我在错误对话框上按下Ok键,然后继续。 我的断点到达&我能够进一步调试。

在eclipse菜单中,进入“窗口->首选项->Java->编译器” 取消标记复选框“添加行号属性…” 单击“应用”->是 标记复选框“添加行号属性…” 再次申请。 愉快调试

我也遇到了同样的问题,我花了很多时间去寻找解决方案,但这些解决方案都是无用的,所以我自学了所有的案例,最后我发现问题是JDK版本之间的冲突。 以下是解决问题的步骤: 1. 删除所有JDK和JRE版本,只保留一个版本。 2. 在Eclipse中设置JAVA_HOME系统和java编译器是一样的。 在某些情况下,上面的错误不会消失,但我们能够运行在调试模型。

我发现了这条信息的另一个原因。我在编程Scala。解决方案是:

打开运行->调试配置 在主选项卡的底部,在“应用”和“恢复”按钮旁边,有一个文本说明你正在使用哪个启动器,旁边有一个超链接说“选择其他”。这是一个奇怪的UI元素,乍一看并不可行。 使用“选择其他”链接并选择“Scala应用程序(新调试器)启动器”。另一个似乎不能与Scala一起工作。

现在调试应该可以工作了。注意,我已经安装了Scala IDE插件,如果您没有这个选项,那么这个选项可能是不可用的。