Unable to install breakpoint in due to missing line number

不能调试JavaBean!

在 eclipse中不能调试,总是报错:“Unable to install breakpoint due to missing line number attributes. Modify compiler options to generate line number attributes”

弄了好半天也没弄出来,最后google了一下,总算解决了。原因是:ANT编译的class Eclipse不认,因为eclipse也会编译class。怎么让它们统一呢,就是在build.xml里的javac标签里加上一句 debug="true",一切就OK了。

如:<javac ... debug="true">

我查看的资料的片段:

The solution given above involving moving your eclipse workspace to be in the app-server's directory is not a very good idea.
The issue, most likely, is that there are two compiles happening -- eclipse's and ant's. The settings for the eclipse compiler don't affect the ant build even if you launch the ant build from within eclipse. Ant controls it's own compiler settings. You can tell ant to generate debugging info like this:

链接:http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-8309.html

 

ant

Make sure you are setting debug=true in your compilation task, otherwise you won't be able to debug.

 

The solution given above involving moving your eclipse workspace to be in the app-server's directory is not a very good idea.
The issue, most likely, is that there are two compiles happening -- eclipse's and ant's. The settings for the eclipse compiler don't affect the ant build even if you launch the ant build from within eclipse. Ant controls it's own compiler settings. You can tell ant to generate debugging info like this:

Code:

<javac ... debug="true" .../>

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值