I have not yet seen "Debug/Fix" to work on my
computer in 3.6. When ever I try to use it I get "
No classes were changed." response, even I just
In my filesystems I have CVS filesystem mounted as
nb_all and various treefs ones over it
(openide/src, openide/test/unit/src) and of course
necessary additional jar files (like junit*.jar).
I start the debug of a test (in my current case
org.openide.text.Starvation37045Test) stop on a
the class, successfully recompile, go to Debug/Fix
and "No classes were changed."
This lead me to believe that there is a serious
bug in the fix and continue support.
Jardo, I just verified in build dev-200402241900 on Linux that Fix
functionality is working perfectly. Please see issue #39242 if it
isn't your case. If not please provide reproducible testcase.
Just tested on newest build. It does not work:
/usr/local/java/bin/java -Xdebug -Xnoagent
Breakpoint reached at line 100 in class
org.openide.text.SaveDocumentTest by thread main.
Thread main stopped at org.openide.loaders.DataObject.find line 434.
Thread main stopped at org.openide.loaders.DataObject.find line 438.
Thread main stopped at org.openide.loaders.DataObject.find line 442.
Thread main stopped at org.openide.loaders.DataObjectPool.getPOOL line 68.
Thread main stopped at org.openide.loaders.DataObjectPool.getPOOL line 69.
Fix aborted: No classes were changed.
PS: I've modified the DataObjectPool.
Do you use Compile action? You are not supposed to, Fix does the
Ofcourse I use compilation, it is nature to use it to dicover errors
and only then upload the class to debugee. Btw. In release35 I could
use compilation and then the fix feature, I never knew that it is
supposed to compile.
This behavior is 'as designed'. Previous reports regarding
Fix&Continue showed that users expect this action to only do
something when some classes are modified. We therefore invoke compile
and check if anything changed before we upload new classes to the VM.
We should definately mention this in the docs as I already suggested
in other comments in other bug reports.
What about to change this DEFECT to ENHANCEMENT (and reopen it) to
rename that action to "Compile & Fix".
Please Jano consider this suggestion. This is not the first report of
HIE: Some people suggested that we modify the Compile action to
automaticaly fix the code if there is a debugging session running. We
might then remove the Fix&Continue action and leave only the Compile
action which would temporarily change to Compile&Fix while debugging.
Conception of F&C integration into the IDE should be discussed again.
Compile action must not automaticaly fix the code, due to the fragile implementation of Fix&Continue.
In CoS mode the "Apply Code Changes" should work correctly.
In non-CoS mode we should probably change the name to "Compile and Apply Changes" or something like that...
If a new hot-swap is integrated into JDK 8, we can consider a better integration with CoS mode...