Use the debug hierarchy

We will now use debug facilities of the RulesComposer to analyze the flow of the generation:

  1. Click Run > Debug Last Launched to launch the generation in debug mode.
  2. Show the Report view.
  3. Right-click the file Order.java in this view.
  4. Click Open Debug Hierarchy.

The debug hierarchy shows up in an editor. A debug hierarchy is a tree of nodes, each node representing an evaluated element (template, rule or script):

We will now find the script that generated a part of the file Order.java:

  1. Select the node main\JavaSource [Order.java] in the debug hierarchy Debug Nodes section.
  2. Select the node Result\result in the Properties section.
  3. Select the text productName in the details pane, bottom part of the Properties section.
  4. Right-click to open the context menu.
  5. Click Find Text in Children Nodes.

The debug hierarchy focus is moved to the node main\JavaSource\declaration\declaration. This is the script defined on rhapsody.Argument whose evaluation produced the text "RhpString productName".

The debug hierarchy is very useful in two situations:

Next Section: Include a Javadoc template
Prev Section: Add operation body

Related tasks
Inspecting a debug hierarchy