Managing Conditional Breakpoints

An enabling condition can be applied to a breakpoint such that the breakpoint suspends execution of a thread in one of these cases:

 To set a condition on a breakpoint

  1. In the Properties view, click into the line where the breakpoint is set.
  2. Press Ctrl+J (Mac OS: Cmd+J) to open code editor. The code editor will be opened with the line of code corresponding to the one selected in the Properties highlighted. Right-click (Mac OS: Ctrl+click) the breakpoint to which a hit count is to be added in the marker bar (vertical ruler) and select Breakpoint Properties from the popup menu. . 
  3. The Properties for... dialog box will be displayed.
  4. In the properties dialog, check the Enable Condition (code assist not available) checkbox. 
  5. Enter the expression for the breakpoint condition in the field below.
  6. Do one of the following:
  7. Click OK to close the dialog and commit the changes. While the breakpoint is enabled, thread execution suspends before that line of code is executed if the breakpoint condition evaluates to true.
A conditional breakpoint has a question mark overlay on the breakpoint icon: .