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.

Bug 12444 - Debugger does not stop at breakpoints set in libraries
Summary: Debugger does not stop at breakpoints set in libraries
Status: CLOSED WONTFIX
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P1 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-26 01:23 UTC by Sakthivel Gopal
Modified: 2001-07-20 20:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sakthivel Gopal 2001-05-26 01:23:55 UTC
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).
Comment 1 Daniel Prusa 2001-05-29 10:08:00 UTC
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 ?
Comment 2 Sakthivel Gopal 2001-05-29 18:01:53 UTC
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
Comment 3 Daniel Prusa 2001-05-30 15:27:56 UTC
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)
Comment 4 Daniel Prusa 2001-06-05 09:31:55 UTC
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.