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 213805 - Line breakpoint can be set where a Method breakpoint is + context menu entry is misguiding
Summary: Line breakpoint can be set where a Method breakpoint is + context menu entry ...
Status: RESOLVED WONTFIX
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-08 09:16 UTC by mienamoo
Modified: 2012-11-26 13:51 UTC (History)
2 users (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 mienamoo 2012-06-08 09:16:06 UTC
NetBeans build 201206080001
JDK 7u3 32-bit

I right-clicked on the triangle icon of a method breakpoint in the margin of my source code, because I wanted to remove the breakpoint. And so I noticed that the context menu of the method breakpoint has "Toggle Line Breakpoint". I would guess that this should be "Toggle Method Breakpoint" instead, since the presence of the method breakpoint means that there will never be executable code on that line to put a breakpoint onto. And then the toggle functionality would be more consistent between a line and method breakpoint's context menu.
Comment 1 markiewb 2012-11-24 15:27:13 UTC
I looked it up in the code. You can set a line breakpoint via this "toogle line breakpoint" action (in the conext menu/main menu/shortcut) at the line where a method starts. That line breakpoint will never work, i think. So set this issue to P3.

ACTUAL: a linebreakpoint can be set where only a method breakpoint is possible
EXPECTED: a linebreakpoint CANNOT be set where a method breakpoint is possible and the menu entry should be named 'toggle breakpoint'
Comment 2 Martin Entlicher 2012-11-26 13:51:54 UTC
That's not always true. A line breakpoint can be valid on method declaration line, if there's also an executable code present.
E.g.: public int getSize() { return size; }

Since it often depends on the compiler if there's possible to suspend the execution or not, we add the "Toggle Line Breakpoint" to all lines.

Method or field breakpoints can be easily set/unset via a click next to the method declaration.