Bug 229855 - "Greater than" breakpoint hit count condition represents >= instead of >
"Greater than" breakpoint hit count condition represents >= instead of >
Status: VERIFIED FIXED
Product: debugger
Classification: Unclassified
Component: Code
7.4
PC Linux
: P3 (vote)
: 7.4
Assigned To: Martin Entlicher
issues@debugger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 12:51 UTC by Jiri Kovalsky
Modified: 2013-05-27 10:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2013-05-16 12:51:59 UTC
Product Version: NetBeans IDE Dev (Build 201305142300)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
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:
============
If user selects "Greater than" type of breakpoint hit count it actually stops debugging when desired breakpoint hit count is reached not 1 hit later as it should be.

Steps to reproduce:
===================
1. Create a sample Java application and add this code snippet into its main(String[] args) method:

18        for (int i = 0; i < 10; i++) {
19            System.out.println("Round: " + i);
20        }

2. Create line 19 conditional breakpoint with "Greater than" type of "Break when hit count is" rule and value 4.
3. Invoke "Debug > Debug Project" from main menu.
4. After a while debugging session is paused.
5. Verify that there are only 3 lines in the output instead of 4:
Round: 0
Round: 1
Round: 2
Comment 1 Martin Entlicher 2013-05-18 16:27:38 UTC
Fixed by changeset:   254071:e37cd26d7920
http://hg.netbeans.org/core-main/rev/e37cd26d7920
Comment 2 Quality Engineering 2013-05-20 02:23:34 UTC
Integrated into 'main-golden', will be available in build *201305192300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e37cd26d7920
User: mentlicher@netbeans.org
Log: #229855: Set the breakpoint request's hit count to the hit count + 1 when it's supposed to break on a hit count greater than the supplied value.
Comment 3 Jiri Kovalsky 2013-05-27 10:52:10 UTC
Product Version: NetBeans IDE Dev (Build 201305262300)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
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


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