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 70058 - Breakpoints disabled when debugging code checked out using CVS
Summary: Breakpoints disabled when debugging code checked out using CVS
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: USABILITY
: 70762 (view as bug list)
Depends on: 71010
Blocks:
  Show dependency tree
 
Reported: 2005-12-08 04:41 UTC by bmochock
Modified: 2006-01-06 14:50 UTC (History)
2 users (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 bmochock 2005-12-08 04:41:17 UTC
After checking out a project from a CVS repository, breakpoints are ignored.  
This occured consistantly for different projects on my XP machine.

On Linux, (gentoo, 2.6 kernel) this problem did't appear.
Comment 1 Maros Sandor 2005-12-09 11:36:55 UTC
Please evaluate once breakpoints work again.
Comment 2 Roman Ondruska 2005-12-09 14:27:07 UTC
Do you use the IDE integrated CVS?
Comment 3 Martin Entlicher 2006-01-03 16:27:31 UTC
The problem is, that after checkout of the project from CVS, the "Generate
Debugging Info" option is set to false!
This is because that information is stored in
nbproject/private/private.properties as javac.debug=true

Java should sync that up somehow, because when the user creates the project,
initially there is "Generate Debugging Info" as true. When they add it to CVS,
delete and checkou again, they get "Generate Debugging Info" as false. This is
very confusing IMHO. What if the private/private.properties are automatically
created with the default content if they do not exist?
Comment 4 Tomas Zezula 2006-01-04 12:42:19 UTC
Checking in org/netbeans/modules/java/j2seproject/J2SEProject.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java,v
 <--  J2SEProject.java
new revision: 1.59; previous revision: 1.58
done
Comment 5 Jesse Glick 2006-01-04 15:04:00 UTC
I would suggest a different fix: don't touch J2SEProject, remove storage of
initial javac.debug in J2SEProjectGenerator (in fact remove creation of
private.properties altogether), and change build-impl.xsl to define true as the
default value for javac.debug if not explicitly set. Might need to change
something in J2SEProjectProperties to reflect a different value, but I am not
sure. This approach be more reliable and cleaner, and would work for projects
that had not been opened in the IDE (this patch does not).

BTW the attached commit also touches JAVADOC_PREVIEW. Is that intentional? IMHO
javadoc.preview (and application.args) should be handled the same way.
Comment 6 Tomas Zezula 2006-01-04 15:26:05 UTC
Reopening to fix it in the build script.
Comment 7 Tomas Zezula 2006-01-04 15:46:11 UTC
The problem with setting properties in the build-impl.xml is that it requires
changes in the customizer. The ToogleButtonModel created by the
StoreGroup.createToggleButtonModel () has value false if the property is not
defined, but in this case we need opposite behavior (true if the property is
missing).
It would require either a compatible API change in the StoreGroup (adding new
factory method), or to copy the model into the j2seproject and modify it there.
The API change is not doable now, so I will create a copy of the model in the
release50 and create a task for the API change in the NB 5.1
Comment 8 Tomas Zezula 2006-01-04 17:31:14 UTC
I've created task for extending StoreGroup:
http://www.netbeans.org/issues/show_bug.cgi?id=71010
Comment 9 Tomas Zezula 2006-01-04 17:49:40 UTC
Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java,v
 <--  J2SEProject.java
new revision: 1.60; previous revision: 1.59
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.71; previous revision: 1.70
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java,v
 <--  J2SEProjectProperties.java
new revision: 1.56; previous revision: 1.55
done
Comment 10 Jesse Glick 2006-01-04 18:24:51 UTC
What I'm missing from the current trunk patch (both optional I guess but would
be nicer):

1. Handling of application.args. This appears to currently be set to "" in
project.properties *and* private.properties by J2SEProjectGenerator, but changes
go into private.properties (I think). Would suffice to remove all mention of it
from J2SEPG (leave J2SEPP alone) and insert into build-impl.xsl

<property name="application.args" value=""/>

2. This block from J2SEPG could simply be deleted:

ep = h.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);
ep.setProperty("application.args", "");
ep.setProperty(J2SEProjectProperties.JAVAC_DEBUG, "true");
ep.setProperty(J2SEProjectProperties.JAVADOC_PREVIEW, "true");
h.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep);
Comment 11 Tomas Zezula 2006-01-05 10:20:19 UTC
I would resolve the additional comments only in the trunk, not in the 5.0
because they shouldn't cause any problems.
Comment 12 Jaromir Uhrik 2006-01-05 12:58:17 UTC
Verified in trunk build #200601041900. I agree that just this part will be
integrated to 5.0 branch. Tomasi, please integrate it to 5.0.
Comment 13 Jan Lahoda 2006-01-05 13:16:12 UTC
I agree with backporting to 5.0.
Comment 14 Peter Pis 2006-01-05 13:17:53 UTC
Verified in trunk.
Comment 15 Tomas Zezula 2006-01-05 13:32:08 UTC
Integrated into release50

Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.69.2.1; previous revision: 1.69
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java,v
 <--  J2SEProjectProperties.java
new revision: 1.55.4.1; previous revision: 1.55
done
Comment 16 Tomas Zezula 2006-01-05 19:16:34 UTC
Moving the setting of the default value of application args into build-impl.xml.
Removing setting of the default values of the application.args, javac.debug,
javadoc.preview from the J2SEPG.

Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java,v
 <--  J2SEProjectGenerator.java
new revision: 1.47; previous revision: 1.46
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.72; previous revision: 1.71
done
Checking in
j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/J2SEProjectGeneratorTest.java;
/cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/J2SEProjectGeneratorTest.java,v
 <--  J2SEProjectGeneratorTest.java
new revision: 1.10; previous revision: 1.9
done
Comment 17 Roman Ondruska 2006-01-06 09:56:00 UTC
*** Issue 70762 has been marked as a duplicate of this issue. ***
Comment 18 Jaromir Uhrik 2006-01-06 14:50:38 UTC
Verified in build #200601052030 from 5.0 branch.