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 22496 - Add Breakpoint dialog - packages are loaded from FS without debugging capability
Summary: Add Breakpoint dialog - packages are loaded from FS without debugging capability
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2002-04-16 15:02 UTC by Marian Petras
Modified: 2003-06-30 17:26 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 Marian Petras 2002-04-16 15:02:26 UTC
When the "Add Breakpoint" dialog is displayed, a
list of Java packages is collected and used in the
"Package Name" combo-box. The list of packages
should be collected only from filesystems having
capability "Use in Debugger" set to false. The
current implementation includes all filesystems.
Comment 1 Marian Petras 2002-04-16 15:04:41 UTC
This bug increases time needed for collection of package names. See
issue #22168.
Comment 2 Marian Petras 2002-04-16 15:08:45 UTC
The dialog should collect package names not only from mounted
filesystems but also from the debugger's bootclasspath. JDK classes
may not be mounted (or may not have capability "Use in Debugger" set
to True).
Comment 3 Jan Jancura 2002-04-16 16:33:18 UTC
problem:
1) list of packages should be collected only from filesystems having
capability "Use in Debugger" set to true

-> you can add breakpoint on such class to (it can be contained in
some jar file, or you can attach to some VM with different classpath

2)The dialog should collect package names not only from mounted
filesystems but also from the debugger's bootclasspath

-> if you do not have mounted such package you will not see source for
it. why do you want to add breakpoint there?
Tou should simply mount such filesystem.


Comment 4 eadams 2002-04-16 18:13:48 UTC
I don't see how this is resolved.

What does it mean to have Use for Debugging set to false?
When is that attribute used?

Why is it correct to use all the filesytems when  creating
the list of package names?

In my case the time to generate the package names drops from
17 seconds to, essentially, 0 seconds, by not having the
debugger scan the JDK sources and the J2ME jar/zip files.
Comment 5 Marian Petras 2002-04-17 11:14:35 UTC
When a debugging session is being started, a separate JVM is started.
The JVM's classpath is made of all mounted filesystems with capability
"Use in Debugger".

So it is reasonable to remove capability "Use in Debugger" for JDK
sources (because you do not need Java _sources_ on a classpath). Let's
imagine I changed the debugger so that it does not parse filesystems
without this capability (fix this issue). Then you will not see JDK
packages in the list of packages. It is not good.

As I suggested, bootclasspath directories and packages could be parsed
so that the JDK packages get to the list. But it would mean that all
the J2ME JARs are parsed, too (since they are on a bootclasspath -
correct?) and there is no performance improvement. It is not good either.

Conclusion: I do not see any good solution. Maybe for NB 4.0 when the
new project infrastructure is available.
Comment 6 Marian Petras 2002-04-17 11:16:07 UTC
I reopened this issue since it is still being solved.
Comment 7 eadams 2002-04-24 02:11:41 UTC
The J2ME jars I was referring to were ones I had mounted 
myself.  I don't know if they are on the bootclasspath
in FFJ, Mobile Edition.

Regarding the JDK sources, I don't find the argument very
compelling.  If I set Use in Debugging to false on src.jar,
then I don't expect it to be used in debugging, including
being parsed for packages.  Also, I don't consider it a 
favor to have all the JDK packages listed in the drop down.
I very rarely set breakpoints in JDK methods and I always
mount the JDK sources for easy reference.  The JDK packages
make the drop down very long and make it harder to find
the packages in my sources files -- the ones I'm very
likely to use.
Comment 8 Marian Petras 2002-05-22 08:12:28 UTC
OK. Filesystems not having capability "Use in Debugger" will be skipped.
Comment 9 Marian Petras 2002-05-22 08:22:20 UTC
Fixed in the main trunk.
Comment 10 Marek Grummich 2003-01-13 10:36:24 UTC
Verified 
Comment 11 Quality Engineering 2003-06-30 17:26:32 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.