2 Minutes To Code (β Version)

Debugging with Eclipse - 2 minute tutorial

How to customize breakpoint in debugger

Eclipse let's you customize your breakpoints in a couple of ways.

You can see the options avaibale in the breakpoints tab available in the upper-left part of the debug perspective shown below.

Select a breakpoint. Now the lower part of the breakpoints tab has 3 main options that can be specidied for each breakpoint.
  1. Hit Count : By default, debugger will suspend execution everytime breakpoint is hit. However if you click teh check-box beside Hit Count and set an integer (say 5) in the text box beside it, then debugger will suspen execution only when the breakpoint is hit 5 times.

  2. Suspend thread/VM : These are radio buttons.y default debugger will only suspend the thread in which breakpoint is hit. However, if you select the radio box Suspend VM, then all threads will be suspended when breakpoint is hit.

  3. Condition : In this option you can instruct debugger to suspend execution only if the condition that you specify in the box is met at the time execution passes through breakpoint. For setting breakpoint, you can use all variables that are in scope at the time control reaches breakpoint (content assist available). You can also say whether to check for condition being true or if the variable changes value.