Eclipse下设置好断点,使用Debug时弹出错误“Unable to install breakpoint due to missing line number attributes,Modify compiler options to generate line number attributes"

Eclipse报的这个错,无非两个原因造成的,解决方法:
1、使用Ant编译时,找到builder.xml,打开debug开关,在使用javac 任务时确认debug=“true”,否则不能调试。注意,这里只适用于build,如果是dist的编译,需要关闭debug
2、编译器的设置问题,window->preferences->java->Compiler在compiler起始页,classfile Generation区域中确认已经勾选了All line number attributes to generated class files。如果已经勾选,从新来一下再Apply一下。或者从项目层次进行设定,项目属性->java compiler同样在起始页,确定已经勾选。

Eclipse:Unable <wbr>to <wbr>install <wbr>breakpoint <wbr>due <wbr>to <wbr>missing <wbr>line <wbr>number <wbr>attributes...


Logo

Agent 垂直技术社区,欢迎活跃、内容共建,欢迎商务合作。wx: diudiu5555

更多推荐