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 195944 - Debugger steps into JDK sources without any reason
Summary: Debugger steps into JDK sources without any reason
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
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
Exception Reporter:


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.