在尝试设置断点时,我在Eclipse中得到这个奇怪的错误。
Unable to insert breakpoint Absent Line Number Information
我勾选了编译器选项的复选框,但运气不好。
在尝试设置断点时,我在Eclipse中得到这个奇怪的错误。
Unable to insert breakpoint Absent Line Number Information
我勾选了编译器选项的复选框,但运气不好。
当前回答
在eclipse菜单中,进入“窗口->首选项->Java->编译器” 取消标记复选框“添加行号属性…” 单击“应用”->是 标记复选框“添加行号属性…” 再次申请。 愉快调试
其他回答
我在试图从Eclipse以调试模式启动Tomcat时遇到了这个问题。我有一个ANT构建文件负责编译和部署。在将调试标志设置为true(如其他答案所述)并重新部署应用程序后,它可以正常工作:
<javac srcdir="./src/java" destdir="./bin" debug="true">
注意:如果您刚刚添加了调试标志并重新编译,那么仍然需要将应用程序重新部署到服务器,因为Eclipse就是在服务器上调试类文件的。很明显,但很容易花一个小时左右的时间挠头,想知道为什么它不管用(相信我)。
在调试部署到Tomcat的WAR(由多个Eclipse项目构件构造)时,我遇到了同样的问题。
我正在使用ANT构建脚本构建所有内容。如果这是您正在做的事情,请确保在您获得的每个javac ant任务上设置了debug=true标志。这是我唯一的问题-我希望它能帮助你的问题!
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文件的版本,清理并重新编译源代码,最后刷新环境。我希望这能对其他人有用。
这解决了我的问题:
窗口->首选项->服务器->运行时环境 Apache Tomcat ->编辑 选择JDK而不是JRE
我在Eclipse IDE中也有同样的错误。 但这似乎是一个可以忽略的错误。 我在错误对话框上按下Ok键,然后继续。 我的断点到达&我能够进一步调试。