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 238899 - "Step Into Next Method" does not work on String
Summary: "Step Into Next Method" does not work on String
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-27 15:53 UTC by Jiri Kovalsky
Modified: 2014-01-29 09:32 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 Jiri Kovalsky 2013-11-27 15:53:17 UTC
Product Version: NetBeans IDE Dev (Build 201311130002)
Updates: Updates available
Java: 1.7.0_40-ea; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b36
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

Description:
============
For some reason "Step Into Next Method" acts like "Step Over" on code using String methods.

Steps to reproduce:
===================
1. Create a new Java application.
2. In JavaApplication.java put the following code at line 19 instead of default TODO comment:

new String("Hello").concat(" world!").length();

3. Press Ctrl + S to save the file.
4. Press Ctrl + F7 to start debugging session.
5. When the execution stops at line 19, invoke "Debug > Step Into Next Method" from main menu.
6. Debugger will not step into any method and highlights line 20 with green color.
Comment 1 Martin Entlicher 2014-01-23 15:44:57 UTC
The problem is, that java.lang.String is in Step Filters by default.
When it's unchecked Step Into Next Method works fine.

I agree that this is confusing, Step Into Next Method should probably ignore the step filters. If it's explicitly selected, it means that the user really wants to step into it.
Comment 2 Martin Entlicher 2014-01-27 15:13:30 UTC
After this is fixed, issue #241016 becomes more visible.
Comment 3 Martin Entlicher 2014-01-27 17:04:38 UTC
I've found it too risky to change the behavior of Step Into Next Method.
When there are multiple method calls on the line, the current behavior skips the methods in filtered classes. This is desired IMHO. If changed to step into the first method regardless on the step filters, it would make the step filters inconsistently applied.

But when the user explicitly selects a particular method during Step Into, it should go there, because the user wants it.

This is fixed by changeset:   271194:970e123bb80f
http://hg.netbeans.org/core-main/rev/970e123bb80f
Comment 4 Quality Engineering 2014-01-28 03:04:46 UTC
Integrated into 'main-silver', will be available in build *201401280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/970e123bb80f
User: mentlicher@netbeans.org
Log: #238899: Step into a particular method ignores step filters.
Comment 5 Jiri Kovalsky 2014-01-29 09:32:44 UTC
Product Version: NetBeans IDE Dev (Build 201401290001)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b63
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b121
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

OK, it is now possible to step into method even though the class belongs to Step Filters.
Comment 6 Jiri Kovalsky 2014-01-29 09:32:57 UTC
Verifying...