This example shows basic usage of debugging.
You have a graph with Reformat. There is the following transformation in Reformat:
//#CTL2 function integer transform() { if ($in.0.product == "A") { $out.0.price = $in.0.basePrice + 5; } else { $out.0.price = $in.0.basePrice + 10; } return ALL; }
Stop when else
-branch is reached.
Right click the line number below else
and select Toggle breakpoint from the context menu.
A breakpoint has been created.
Run graph with
→ . Graph runs till the breakpoint is hit.When the breakpoint is hit you are asked to confirm perspective switch. Designer switches to Debug perspective. There you can inspect variables, manage breakpoints, or continue in execution.
This example shows usage of hit count.
You perform some calculation in cycle. The calculation gives an interesting result in 20th cycle. Stop in 20th cycle without stopping earlier.
Place breakpoint into the correct place with the cycle.
Right click the breakpoint and select Breakpoint properties....
In breakpoint properties, enable Hit count and enter 20.
Run graph in debug mode:
→ .This example shows creating a breakpoint that stops only if the field contains a specific value.
Stop transformation only if $in.0.field1
is 500 or more.
Create a breakpoint.
Right click the breakpoint and select Breakpoint properties....
Select conditional.
In the field below, type $in.0.field1 >= 500
.
Run the graph in debug mode:
→ .This example shows usage of Conditional breakpoint with Suspend when value changes option.
Stop at the breakpoint if value of a variable changes.
Create a breakpoint.
Right click the breakpoint and select Breakpoint properties....
Select Conditional and Suspend when value changes.
Enter a name of the variable to be watched.
Run the graph in the debug mode:
→ .