Lampapos
Lampapos

Reputation: 1081

Breakpoints in JRE System Library in Eclipse

I tried to make breakpoint in the class from JRE System Library, but when I started debug I recieved message: "Unable to install breakpoint at ... due to missing line number attributes. Modify compiler options to generate line number attributes." So what should I do: recompile JRE System Library from sources with debug information and use it? Or there is some more simple way?

Upvotes: 5

Views: 3119

Answers (3)

Lampapos
Lampapos

Reputation: 1081

So, the most simple way - to use JDK instead of JRE. In this case we can use breakpoints in system library. BUT we cant monitor values of local variables. For this purpose we should recompile rt.jar (without sun.* packets, because they are proprietary). Process of recompilation described there. It's in russian, but at the and of article situated the link to the result rt-dbg.jar.

Upvotes: 1

nitind
nitind

Reputation: 20003

The simplest thing to do is get the equivalent JDK and target that instead.

Upvotes: 0

Kai
Kai

Reputation: 39632

You just have to enable some compiler options. Right click your project and select Properties. Go to Java Compiler and enable the checkboxes Add line number to generated class files (used by the debugger) and the other ones.

Upvotes: 0

Related Questions