This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In Debugging a Transparent Persistence Application which uses a library of Persistence Capable Classes, break points are set in PC Classes. (Suppose in empdept/Employee.java ) Debugger doesn't stop at the breakpoints set in Employee.java (Library/PC Class).
One of the possible reasons why the debugger does not stop on line breakpoints set in Employee class can be the fact that the class does not contain needed line debug info. The line info is not generated if -g:none parameter is passed to javac. In such a case you need to recompile classes in the library using -g option. What about method breakpoints (created using Ctrl+Shift+F8, breakpoint type = method) ? Their functionality does not depend on the debug info. Do they work in Employee class ?
The classes that make up empdept.jar has been set for external compilation. The external compilation has debug enabled and debug trace option set to '-g'. Also, the method break points have been introduced in Employee Class, debugger does not stop at the methods too. -Sakthivel.gopal@eng.sun.com 05/29/2001
We are not able to reproduce this problem using some jar file. Can you send me your empdept.jar, please ? (daniel.prusa@czech.sun.com)
I have investigated the issue using the mentioned Transparent Persistence Application. It seems that the problem arise after Employee class is "enhanced" by the Transparent Persistence module. There is something wrong with line debug info. In more details: I tried to debug a simple application that creates an instance of Employee and calls method getEmpid on it. Employee class was taken from empdept.jar. In such a case, when transparent persistence is not involved, the debugger does not stop at the line brekpoint set in getEmpid as well. The reason why is that com.sun.jdi.ReferenceType.locationsOfLine (int) method - http://java.sun.com/j2se/1.4/docs/guide/jpda/jdi/com/sun/jdi/ReferenceType.html does not return Location corresponding to the brekpoint's line (an empty list of Locations is returned). If Employee class is inspected using javap -l, all methods' lines are listed. So, line debug info is generated, but it is probably broken in some way, because JPDA debugger cannot obtain it (sun.tools.debug.* debugger implementation cannot obtain it too). The same problem occurs when Transparent Persistence Application is launched by Transparent Persistence Executor with debug parameters (-Xdebug - Xrunjdwp:transport=dt_socket,server=y,suspend=y) and the debugger is attached to it. However, it is possible to set and stop at method breakpoints. They seem to be OK. If Employee.java is compiled by javac (not enhanced by transparent persistence) and my application is debugged then the debugger stops at the breakpoint. To fix this issue, I think that Transparent Persistence team should verify if debug info is correctly generated during enhancement of tp classes.