I am getting this strange error in Eclipse while trying to set a breakpoint.
Unable to insert breakpoint Absent Line Number Information
Ticked the checkbox from Compiler options but no luck.
Thanks
I am getting this strange error in Eclipse while trying to set a breakpoint.
Unable to insert breakpoint Absent Line Number Information
Ticked the checkbox from Compiler options but no luck.
Thanks
It would help if you did indicate the version of eclipse you are using and the technology (Java JDT, or AJDT for Aspect Java, or C++ CDT for instance), just to be sure.
On the Java side, I suppose your "Ticked the checkbox from Compiler options" refers to this
Under "Window --> Preferences --> Java --> Compiler --> Classfile Generation
", all 'Class file
' generation options are set to True:
Does your project has those checked only at global level (widows Preferences) or at project specific level ?
And are you sure the class opened (on which you try to set a breakpoint):
.java
, not a .class
?Try to clean everything and rebuild all, check for potential jar conflicts.
I had the same error message in Eclipse 3.4.1, SUN JVM1.6.0_07 connected to Tomcat 6.0 (running in debug-mode on a different machine, Sun JVM1.6.0_16, the debug connection did work correctly).
Window --> Preferences --> Java --> Compiler --> Classfile Generation: "add line number attributes to generated class file" was checked. I did a clean, recompile. I did uncheck it, recompile, check it, recompile. I made sure the project did use the global settings. Still the same message.
I switched to ant build, using
<javac srcdir="./src/java" destdir="./bin" debug="true">
Still, same message.
I didn't find out what caused this message and why it wouldn't go away. Though it seemed to have something to do with the running Tomcat debug session: when disconnected, recompiling solves the issue. But on connecting the debugger to Tomcat or on setting new breakpoints during a connected debug session, it appeared again.
However, it turned out the message was wrong: I was indeed able to debug and set breakpoints, both before and during debugging (javap -l did show line numbers, too). So just ignore it :)
I had this problem while attempting to start Tomcat in debugging mode from Eclipse. I had an ANT build file taking care of the compile and deploy. After setting the debug flag to true (as mentioned in other answers) and redeploying the application it worked fine:
<javac srcdir="./src/java" destdir="./bin" debug="true">
NOTE: if you've just added the debug flag and recompiled you still need to redeploy your application to the server since this is where Eclipse is debugging the class files. Very obvious but easy to spend an hour or so scratching your head and wondering why it's not working (trust me).
I had this same problem when debugging a WAR (constructed from multiple Eclipse project artifacts) deployed to Tomcat.
I am building everything using an ANT build script. If this is what you are doing, make sure that the debug=true flag is set on every javac ant task you've got. This was my only problem - I hope it helps your problem!