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 254256 - IDE allows to toggle line breakpoint on a method declaration
Summary: IDE allows to toggle line breakpoint on a method declaration
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 06:35 UTC by stwr
Modified: 2015-08-12 14:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Picture is showing described breakpoints (67.15 KB, image/png)
2015-08-11 06:35 UTC, stwr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-08-11 06:35:45 UTC
Created attachment 155257 [details]
Picture is showing described breakpoints

Product Version: NetBeans IDE Dev (Build 201508100002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\dev

Test Case --> http://services.netbeans.org/synergy/client/app/#/case/952/suite/1632/v/1

--Use Case--

1. Place caret somewhere on a line with method declaration
2. Toggle line breakpoint

--Expected--

IDE does not allow to toggle line breakpoint on a line with method declaration like it does for lines with class definition. IDE beeps.

--Actual--

IDE toggles a line breakpoint which is actually useless because there is no executable location at this line. It is possible to toggle such breakpoint via: CTRL+F8, editor context menu and gutter context menu.
Comment 1 Martin Entlicher 2015-08-12 14:56:55 UTC
This is allowed intentionally, methods might have some code on the declaration line. E.g.: public in getX() { return x; }
We'd have to test for a presence of code on the declaration line. IMHO this is more like P4 priority.