unable to install breakpoint in ...(file name) due to miss line number attributes.

unabletoinstallbreakpointin...(文件名或者库名)duetomisslinenumberattributes.midifycompliteroptionstogeneratelinenumberattributes.

reason:

absentlinenumberinformation



从网上找到了好几种方法,都不管事。

无意中不直接调研库而是改成以源码的方式调用库,竟然不出现这个问题了。看了库的源码,编译器中好像没有设定absentlinenumber.

只是为何用源码就可以了呢?


附上网上的方法:

http://hi.baidu.com/cuke_love/item/27c3c38c6dad145a27ebd964

解决方法:1:假如你用的是ant调试的话,那么请在你的build.xml里面加上这句话<javac.....debug="true"/>

2:项目->属性->Java编译器->类文件生成->将行号属性添加至生成的类文件(由调试器使用)->打勾

Project--->Properties---->javaCompiler---->classfileGeneration
选中下面的复选框,点击Apply后,点击OK就可以了假如你之前的是勾选上了,那么请你把勾去掉apply一下,然后在打开把勾又勾上一遍。在apply,最后点击ok


http://blog.163.com/baicai_xiao/blog/static/1902024072012930111931946/

因为在被编译的时候没有加入line number的属性到这个class文件,所以就没有办法调试。

我们在用Eclipse编译文件是,"Add line number attributes to generated class files (used by the debugger)"在perferences -> java -> compiler中是被默认选中的。

如果用javac编译的时候需要用 -g参数,ant用的是debug="true"属性。


http://hi.baidu.com/xyrrwcom/item/dac5caa5fedc8ad85af19111

MyEclipse调试问题-Unable to install breakpoint

error:Unable to install breakpoint in due to missing line number

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" .../>

其中更改ant的方法,我没有测试。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值