Inspecting a debug hierarchy

When an MDWorkbench evaluation is launched in debug mode, a debug hierarchy may be created. A debug hierarchy is a tree of nodes, each node representing an evaluated element (template, rule or script).

To inspect a debug hierarchy:

  1. Click Window > Preferences and MDWorkbench > Rules Development > Run/Debug
  2. Select the option Create debug hierarchy and click OK.
  3. Launch an MDWorkbench evaluation in debug mode.
  4. In the Report view, click the hyperlink Open Debug Hierarchy.

In the debug hierarchy editor, you can select a debug node and inspect the arguments and result of the node. For a text template, you can consult the generated contents as well as the name of the generated file.

Tip: If the text template output has been generated using scripts, you can easily search the script that generated a portion of the output:

  1. Select a text template node in the debug hierachy.
  2. Select the result variable.
  3. Select a portion of text of the result.
  4. Right click Find Text in Children Nodes.

Tip: when a generated file is selected in the Report view, clicking on Open Debug Hierarchy opens the debug hierarchy on the text template that genererated this file.

Note: a debug hierarchy comes at a cost in both time and space. For long-running debug evaluations, when you're interested in setting Java breakpoints but you don't need to consult the debug hierarchy, you can disable the debug hierarchy creation using the preferences MDWorkbench > Run/Debug from the Window > Preferences menu.