• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse - Breakpoint Hit Count

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

Could anybody please tell me what is Breakpoint Hit Count in Eclipse Debugger IDE .

When i gone through Eclipse Tutotrial from

http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/breakpoints/ref-hitcount_option.htm

I found this below , but i couldn't understand

"Select the Hit Count option to define a hit count for the selected breakpoint.
The Hit Count option is used to determine when your program should suspend on that breakpoint. "

Could anybody please tell me , what is this Hit Count in Eclipse IDE Debugger .

Thanks in advance . please suggest .


 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It means that the debugger will not stop at the breakpoint the first time, but only after that breakpoint has been passed N times (where N is the hit count).
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

It means that the debugger will not stop at the breakpoint the first time, but only after that breakpoint has been passed N times (where N is the hit count).



Thanks Jesper for the reply , to be frank I did not get what do you mean by the above thing :

Assume that this is my sample program , how can the above theroy suit my sample program given below . Please suggest .

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ravi Kiran Va wrote:

It means that the debugger will not stop at the breakpoint the first time, but only after that breakpoint has been passed N times (where N is the hit count).



Thanks Jesper for the reply , to be frank I did not get what do you mean by the above thing :

Assume that this is my sample program , how can the above theroy suit my sample program given below . Please suggest .



Let's assume you put a breakpoint on the "First Line" println statement and set the hit count to 5.

The first 4 times that statement is executed, the debugger will keep going as though there was no breakpoint there. However, on the 5th time (in the current debug run), the breakpoint will be taken and the debugger will pause execution.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much , Tim Holloway , that was a nice explanation , but why this sort of behaviour would be useful anywhere ??

Thanks .
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because sometimes you want the debugger to stop the 100th time it passes some breakpoint, and it quickly becomes tedious if you have to keep on clicking "Continue" the first 99 times.
 
It's feeding time! Give me the food you were going to give to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic