Rule Builder > Debugging and Profiling > Debugging > Setting Breakpoints

Breakpoints provide you with a way of stopping the execution to examine the state of variables, the agenda, and working memory. There are three types of breakpoints that you can set:

To remove all the breakpoints:

Setting Rule Breakpoints

To set a rule breakpoint, do one of the following:

An example of how to set a breakpoint is shown in Figure 16.21.

images/ruleBreakpoints.gif

Figure 16.21    Setting a Rule Breakpoint

Setting Class Breakpoints

Class breakpoints allow you to stop the execution whenever an instance of a class is added, retracted, or updated in the XOM.

To set a class breakpoint:

Depending on which breakpoint you choose, a red ball with the first letter of the breakpoint type, I for Insert, R for Retract, or U for Update, appears on the left of the class name. You can set or unset any combination of the three types of breakpoints as shown in Figure 16.22.

images/classBreakpoints.png

Figure 16.22    Unsetting a Class Breakpoint

You can also set a breakpoint on a field of a class. The execution will stop when this field is modified in any instance of the class, and when the modification occurs inside the action part of a rule by means of an assignment operator.

To set a breakpoint on a field:

  1. Double-click the class to expand it and right-click the field.
  2. On the shortcut menu that opens, click Set/Unset Modify Field Breakpoint.

A red ball with the letters MF appears on the left of the class name. A second red ball appears on the left of the field name, as shown in Figure 16.23.

images/classFieldBreakpoints.gif

Figure 16.23    Unsetting a Class Field Breakpoint

Setting Object Breakpoints

Object breakpoints allow you to stop the execution whenever an object is added, retracted, or updated in the working memory.

To set an object breakpoint:

Depending on which breakpoint you choose, a red ball with the first letter of the breakpoint type, R for Retract or U for Update, appears on the left of the object name. You can set any combination of the two types of breakpoints.

You can also set a breakpoint on a field of an object. The execution stops when this field is modified inside a rule by means of an assignment operator.

To set a breakpoint on a field:

  1. Double-click the object to expand it and right-click the field.
  2. On the shortcut menu that opens, click Set/Unset Modify Field Breakpoint.
  3. A red ball with the letters MF appears on the left of the object name. A second red ball appears on the left of the field name, as shown in Figure 16.24.

  4. images/wmemoryBreakpoints.gif
  5. Figure 16.24    Object Field Breakpoint in Working Memory Panel

See Also

Viewing Breakpoints | Editing Breakpoints | Setting Up the Execution Object Model


Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. PREVIOUS   NEXT