Bug 70372 - [50cat] [tools] Single step, continue, and step into are not working when debugging modules, break points not catching correctly
[50cat] [tools] Single step, continue, and step into are not working when de...
Product: debugger
Classification: Unclassified
Component: Java
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: issues@debugger
breakpoints sources
: 70373 70374 85086 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2005-12-14 02:57 UTC by _ wadechandler
Modified: 2010-04-29 09:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT

netbeans messages.log file from the IDE (340.09 KB, text/plain)
2005-12-14 03:23 UTC, _ wadechandler
netbeans messages.log from the running platform. (14.80 KB, text/plain)
2005-12-14 03:24 UTC, _ wadechandler

Note You need to log in before you can comment on or make changes to this bug.
Description _ wadechandler 2005-12-14 02:57:38 UTC
[ JDK VERSION : 1.5.0_05 ]

I am trying to debug a module I'm developing.  I got the latest sources from CVS on 2005-12-07 and built the IDE at 4:34 PM US EST.  It is now 2005-12-13 at 9:38 PM US EST.  I build my module.  I set break points.  I debug it.  The break point will catch.  I can set other break points in the same file lines below the stopped.  I hit continue and it will not catch.  If I try to single step it simply continues.  The IDE then starts acting strange.  It locks up sometimes, others is slows down, and other times it just continues functioning.  The debugged IDE/Platform will stall out a bit as well and get slow.  It will continue to run (I can't say work) and break points will be missed.  If I have other break points in other files they will catch as long as the IDE isn't stopped debugging in that particular file where the next break point which should catch.  

So, lets say I have files 1, 2, 3.  I set break points in all 3.  The debugger/IDE stops on a break point in 2.  I set another break point in file 2 a line or two below the current break point the IDE stopped on.  It should catch when I hit continue, but it doesn't.  The IDE seems to be getting errors per the log I'll attach later.  If during the time I am debugging the break point happens to stop near a line that will call another line with a break point in another file (say it's in file 1 and I'm in file 2) then the IDE will stop on that break point, it just will not stop on other break points from within the same file nor will it single step or step into.

If I have break points in file 2 and 3 and it stops on a break point in 2.  I can set a break point a couple of lines down and know it should stop.  Then lets say some time after it should have stopped on the newly set break point it will call code which will call code in file 3 which has a break point.  The debugger will stop on this break point in the other file (3).  Now, once I'm in 3 it will not single step, catch a break point, nor step into anyything.  When I hit single step, continue, or step into it behaves the same and will continue to run and possibly will stop on a break point in another file.

I'm working on a module to contribute to NB, so I'll make an attachment with the entire project.  I'll make attachments with both logs from the platform and the IDE.

All I did:  I got NB using win-cvs.  I built the IDE without an error.  I then moved this build to a different folder.  This copy is what I'm using for development.  I'm using the build/source version as the platform (not the copy,but same code).  I then created a new module project.  Once I got to where I could try to debug and test some code this is the error/behaviour I am getting from the IDE.

Other projects seem to be debugging and running fine.  Web and j2se.
Comment 1 _ wadechandler 2005-12-14 03:20:06 UTC
*** Issue 70374 has been marked as a duplicate of this issue. ***
Comment 2 _ wadechandler 2005-12-14 03:20:44 UTC
*** Issue 70373 has been marked as a duplicate of this issue. ***
Comment 3 _ wadechandler 2005-12-14 03:23:05 UTC
Created attachment 27810 [details]
netbeans messages.log file from the IDE
Comment 4 _ wadechandler 2005-12-14 03:24:12 UTC
Created attachment 27811 [details]
netbeans messages.log from the running platform.
Comment 5 _ wadechandler 2005-12-14 03:26:27 UTC
I have attached my log files.  I'll hold off attaching anything else for now. 
It seems the log file from the IDE has some pretty good info.  I built the IDE
from a CVS checkout of "standard".  I assumed the debugger should be working. 
If I need to get another version and try it please let me know.
Comment 6 Roman Ondruska 2005-12-14 11:00:45 UTC
I suppose you have opened you module via File -> Open Project. Please, have a
look you have your sources in the Sources view (when debugging -- menu Window ->
Debugging -> Sources -- set Use for debugging). 
Comment 7 _ wadechandler 2005-12-14 13:02:51 UTC
Hmm.  Apparently I didn't have that checked.  I thought I did as I was actually
getting to break points.  In previous versions I'm pretty sure 4.1.  When you
didn't have this checked you didn't get stopped on any break points, so you knew
exactly what was wrong if you new about the debugger sources.  It seems like
this shouldn't stop at all if the sources check box for this source isn't checked.
Comment 8 Roman Ondruska 2005-12-14 13:36:35 UTC
Yes, current behavior is to stop even when not checked in sources view. This is
because of debugging of JDK. On the other hand, it is possible we will change
the whole concept of sources view in the future.
Comment 9 _ wadechandler 2005-12-15 14:29:56 UTC
I was told in the netcat5.0 mailing list to reopen because of the exceptions and
hanging of the IDE.  

From Net Cat:
"If you are still experiencing problems after proper setup of sources, 
reopen the issue.

When sources are not set for debugging, the breakpoints are reached and 
breaks execution. But invoking step operation behaves same as continue. 
No exceptions should be thrown, no hangup of debugger. If this does not 
work, it is a P1 bug. But I have no prolems with it.

Lubo" "Lubomir Cincura" <Lubomir.Cincura@Sun.COM>

What happens is that you press step over or into and it tries to behave like a
normal continue, but it hangs and acts very slow, and does not act like
continue.  Both the debugged and the debugger act strangely.  I imagine it's
from the thrown exceptions you can see in the IDE log file.  I would imagine it
would just run on, but it doesn't.  So, if it still stops on break points and
acts just like continue:
1) I would expect it to stop on the break points <- It does this
2) I would expect it to stop on the next break point when I hit continue, step
over, or step into <- It does not do this.

Explanation of 2:
Say I have lines
File f = new File("blah blah");:  break point 1
   //do something and make sure it does
//work with file
[code]:  break point 2

If the debugger is not currently stopped in the file with this code and these
are the only two break points in the file.  It will stop on break point 1.  When
I press continue, step over, or step into according to what I understand the
correct behavior to be it should continue and stop on break point 2 and act just
like any other debugging session other than everything acts like continue.

1) Indeterminate hanging occurs. (the time is not static and sometimes it
doesn't hang too long and other times it will hang for a long time)
2) It doesn't stop on any other break points other than the one it stopped on
when it wasn't debugging the file. i.e.  the file was not being debugged yet, a
break point is caught, now this file is being debugged, no other break points in
this file will catch, if another file has break points that will be reached
these will catch (sometimes, but never the same file), after the file has
changed break points in a previous file may be reached again
3) You can not examine the variables or anything like you could if it were
behaving like a normal debug session except all the buttons act like continue
4) Sometimes the buttons [continue, step over, and step into] will be visible
like the debugger has stopped yet no line is highlighted and the screen locks up
a bit.  It's like it's stopping on break points, yet it's not allowing you to
see the variables nor is it showing which break point it is stopped on.

If anything isn't clear here please ask me to elaborate more, and I'll be happy
to.  If you need any other log files or anything.

All I did here was:
1) New Project->"Module Project"
2) Started writing code
3) decided to debug some of it without remembering to check the sources for the

Personal Note/Opinion: I suppose I would have expected the project sources to
automatically be checked to debug since I have my project set as the main
project.  At least for the first time it has been debugged.  Apparently the
checked sources for debug are persisted between IDE runs, so it seems like this
would be possible.
Comment 10 Roman Ondruska 2005-12-16 13:33:45 UTC
We had to reduce the number of classes (performance reasons), so these
exceptions are as designed (should not occur with a fresh user dir).
Comment 11 _ wadechandler 2005-12-16 18:47:59 UTC
I took the last comment and deleted my dev user directory from my
%userprofile%\.netbeans directory and the errors went away.  However, the
debugger does not act anything like a normal debugger...no break points are
caught in source code that is not checked to be debugged.  This is how I would
have expected it to behave though.  So, instead of the debugger working the same
and having step over and into work like continue Ijust don't get any debugger
activity for sources without a check box.  It behaves as should for sources with
the check box.  Is this the correct behaviour?  I'm a little confused by some
other comments.  I was expecting...based on the other comments....for the break
points to catch and to find that step over and into work like continue for
sources which are "not" checked to be debugged in the debugger sources view. 
However, it does behave as I would have expected it to.
Comment 12 Martin Entlicher 2005-12-19 16:22:43 UTC
Well, there is no exact definition of the behavior regarding breakpoints when
the sources are un-checked AFAIK.
But the current behavior for us is that the breakpoints are hit, but step works
like continue. But it's true, that sometimes the debugger behaves strange - it
occasionally stops without the green line somewhere in the unchecked sources and
sometimes it seems like it miss some breakpoints. However, this does not seem to
be consistent and it's seems to be reproducible only with large applications
(not HelloWorld-like applications). OTOH when you do not put breakpoints into
the unchecked sources, the calls to appropriate method are skipped correctly.
However, if sources are properly checked on, I have no problems.

There is already enhancement #63879 submitted, which concerns the Sources Window
and the not-much-intuitive design. We'll find some solution of it for 5.1. That
should basically resolve the problem.

I agree that there is some problem with how debugger behaves when the sources
are not checked on. Since this is most probably an unwanted situation anyway,
I'm downgrading this to P3 (the correct use-case with enabled sources works
well) and we'll be solving this into 5.1.
Comment 13 Martin Entlicher 2006-09-20 10:02:44 UTC
*** Issue 85086 has been marked as a duplicate of this issue. ***
Comment 14 Peter Pis 2008-04-10 22:54:34 UTC
Changing TM for open issues.
Comment 15 Martin Entlicher 2008-11-10 15:18:45 UTC
in NB 6.x breakpoints in sources not enabled for debugging do not work. Therefore they are consistent with steps.

We plan to redesign the sources management into NB 7.0, the behavior might be polished.
Comment 16 Martin Entlicher 2009-11-05 15:12:55 UTC
I hope that this can be fixed now - when sources are not enabled for debugging, breakpoints are marked as invalid (with
a message printed into debugger console) and steps just skip such sources. Therefore it should behave consistently now.
Comment 17 Quality Engineering 2010-04-29 09:27:55 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo