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 241062 - Step into selection on jdk8
Summary: Step into selection on jdk8
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.0
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 13:30 UTC by Egor Ushakov
Modified: 2014-07-09 02:48 UTC (History)
0 users

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 Egor Ushakov 2014-01-28 13:30:17 UTC
I'm not sure if this is a bug or a feature of jdk8:
step into selection does not work as expected:
foo( // step into here just step to the next line, no selection
  boo(1),
  zoo(2)
);
it looks like this happens because now if expression has method calls on several lines, debugger allows to set breakpoints on any line (not the first line as it was before).
Comment 1 Martin Entlicher 2014-01-28 14:52:44 UTC
Yes, thanks, we need to adapt debugger to the new behavior in JDK 8.
JDK 8 add line information for all lines in an expression that spans multiple lines.
Comment 2 Martin Entlicher 2014-02-04 17:24:57 UTC
Fixed by changeset:   271600:1697edccb8e5
http://hg.netbeans.org/core-main/rev/1697edccb8e5
Comment 3 Quality Engineering 2014-02-07 02:40:15 UTC
Integrated into 'main-silver', will be available in build *201402070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1697edccb8e5
User: mentlicher@netbeans.org
Log: #241062: Step over expression and Step into selection now count with intermediate line locations in expressions introduced by javac in JDK 8.
Comment 4 Egor Ushakov 2014-03-07 14:14:12 UTC
Product Version: NetBeans IDE Dev (Build 201403070001)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b129
System: Windows 8 version 6.2 running on x86; Cp1251; en_US (nb)

Still no luck:
foo(boo(1,2), // f7 and select foo just steps to the next line
    zoo(3,4));
Comment 5 Egor Ushakov 2014-03-07 14:22:23 UTC
I got it, it works when no breakpoints are set on these lines.
Try to set a breakpoint on one or either lines and it will work incorrectly.
Comment 6 Martin Entlicher 2014-07-07 21:41:51 UTC
Reproduced.
The original issue was fixed, but there comes an unintended breakpoint behavior into the game.

When we have code like:

21    private void test() {
22        foo(boo(1,2), // f7 and select foo just steps to the next line
23            zoo(3,4));
24    }

and breakpoint on line 22, then after the breakpoint is hit and you do Continue, the breakpoint is then hit again.
This behavior is the result of the following LineNumberTable:
      line 22: 0
      line 23: 10
      line 22: 13
      line 24: 17
and the fact, that we submit the breakpoint for all locations on the given line. Therefore we submit 2 breakpoints at bci=0 and bci=13 in this case.

I've compared the behavior with jdb and apparently jdb submits the breakpoint only to the first location on the line. Therefore I guess that we should do the same.
Comment 7 Martin Entlicher 2014-07-07 23:02:46 UTC
Fixed by changeset:   275549:7a5a55810bb2
http://hg.netbeans.org/core-main/rev/7a5a55810bb2
Comment 8 Quality Engineering 2014-07-09 02:48:13 UTC
Integrated into 'main-silver', will be available in build *201407090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7a5a55810bb2
User: mentlicher@netbeans.org
Log: #241062: Submit the breakpoint for the lowest location on the line only.