Using Conditional Breakpoints and Pass Counts

To specify options for the selected breakpoint

  1. Right‑click on a selected breakpoint in the Breakpoints window.

  2. From the popup menu that is then displayed, select the Options command.

    The Breakpoint Options dialog, shown in the following image, is then displayed.

  3. Check the Enabled check box if you want to disable the current breakpoint. (Conversely, if the selected breakpoint is currently disabled, check the Enabled check box to enable that breakpoint.)

    The Jade Debugger never halts execution at a disabled breakpoint.

  4. In the Condition control, specify a condition that you want evaluated, if required.

    A condition can be:

    • Any Boolean expression; for example, "a > b", where "a" and "b" are defined in the scope of the receiving method.

    • One or more if instructions that specify a return value of true or false; for example:

      if indx = 13 then
          return true;
      elseif indx = 1 and cust.number = 345 then
          return true;
      else
          return false;
      endif;
      

      This condition must begin with the conditional if instruction. All branches must return a valid Boolean expression.

    Jade constructs a transient method that is essentially as follows.

    m1(): Boolean;
    vars
        local-variable-and-parameters
    begin
        load-locals-entities-with-values-from-the-actual-method-being-debugged
        return expression;  // for case 1 in the above list
        expression;         // for case 2 in the above list
    end;

    The condition source is validated when it is entered. If the enclosing method is subsequently recompiled, the breakpoint is marked for revalidation the next time it is encountered. If it is found to be invalid, the Debugger stops execution at the breakpoint and disables it.

  5. In the Pass count text box, specify the number of times that the breakpoint is passed (that is, the number of times a specific statement is executed) before execution halts.

    The pass count is decremented each time the breakpoint is reached and the Debugger stops when the count reaches zero (0).

  6. Click the OK button. Your breakpoint options are saved if the Save Breakpoints check box is enabled in the Exit sheet of the Preferences dialog (accessed from the Options menu Preferences command). Alternatively, click the Cancel button to abandon your selections.