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

unable to install breakpoint in ...(文件名或者库名) due to miss line number attributes. midify compliter options to generate line number attributes. 

reason:

    absent line number information



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

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

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


附上网上的方法:

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

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

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

                       Project--->Properties---->java Compiler---->classfile Generation
                        选中下面的复选框,点击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的方法,我没有测试。


你可能感兴趣的:(unable to install breakpoint in ...(file name) due to miss line number attributes.)