Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 195944 - Debugger steps into JDK sources without any reason
Debugger steps into JDK sources without any reason
Product: debugger
Classification: Unclassified
Component: Java
PC Windows 7
: P2 (vote)
: 7.0
Assigned To: Martin Entlicher
Depends on:
  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


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, 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, 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
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

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 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
Comment 7 Quality Engineering 2011-03-02 07:01:12 UTC
Integrated into 'main-golden', will be available in build *201103020001* on (upload may still be in progress)
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