Wednesday, November 2, 2011

Java: Unable to install breakpoint due to missing line numbers

If you try to debug in Java and get this error, like in Eclipse, it most likely that you build the class with some other tools, like Ant, other than eclipse. So the .class files generated by these kind of tool do not include debug information. The debugger will complain missing attributes.

To solve this, simply delete those .class files and rebuild with eclipse by:
Project -> Clean, or use command: ant clean
Project -> Build

After that, you should able to toggle breakpoint and start the debugger without error:)

No comments:

Post a Comment