Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 195944 - Debugger steps into JDK sources without any reason
Debugger steps into JDK sources without any reason
Status: RESOLVED FIXED
Product: debugger
Classification: Unclassified
Component: Java
7.0
PC Windows 7
: P2 (vote)
: 7.0
Assigned To: Martin Entlicher
issues@debugger
jdk_bug_7023375
: REGRESSION
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-24 14:26 UTC by Tomas Danek
Modified: 2011-03-02 07:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2011-02-24 14:26:55 UTC
20110223, JDK7ea, Win7
-------------------
- create maven j2se project
- navigate into App.java, put breakpoint on line with system out
- invoke debug action on file
- debugger stops at BP, invoke step over (f8)
- debugger moves to the next line (i.e.end of main method)
- invoke step over
- debugger jumps into Thread.java, into exit() method

expected behavior would be to end debugging after first step over from line with system out.
Comment 1 Martin Entlicher 2011-02-24 15:39:43 UTC
Reproduced.
The same behavior is for ANT projects.
Comment 2 Marian Mirilovic 2011-02-28 07:49:09 UTC
Tomasi, does it mean it's 'JDK 7 only' issue (not reproducible on JDK 6) ?
Comment 3 Tomas Danek 2011-02-28 08:23:40 UTC
You are right, I can reproduce even with JDK6 on my Win7 machine. In such a case, i think it's a regression, and fix should make it into 7.0.
(In reply to comment #2)
> Tomasi, does it mean it's 'JDK 7 only' issue (not reproducible on JDK 6) ?
Comment 4 Martin Entlicher 2011-02-28 16:53:26 UTC
This is not a new regression. It's there since JDK sources were included for debugging by default.
Unfortunately this is a normal behavior of step over. :-( I've verified that with jdb. When I remove standard java.* and com.sun.* excludes, step over goes from main() method to Thread.java:671.

I agree that this can be confusing, but it's just the standard debugger behavior. I would have to implement some hack to "fix" this...
Comment 5 Martin Entlicher 2011-03-01 13:31:50 UTC
I've submitted http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7023375 for this, since IMHO step into should go into Thread.exit(), but not step over.
Comment 6 Martin Entlicher 2011-03-01 20:43:53 UTC
Until JDK bug is resolved, I've workarounded the issue by changeset:   189815:c67c32f6a2aa
http://hg.netbeans.org/main/rev/c67c32f6a2aa
Comment 7 Quality Engineering 2011-03-02 07:01:12 UTC
Integrated into 'main-golden', will be available in build *201103020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c67c32f6a2aa
User: mentlicher@netbeans.org
Log: #195944 Do not step into Thread.exit() method when stepping over from main() method.


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