You can place breakpoints on a statechart diagram or in a guard or action. The following sections provide information about placing breakpoints in both of these locations.
Placing Breakpoints on a Statechart Diagram
Complete the following steps to place a breakpoint on a statechart diagram.
- Run the caller VI.
- Right-click the Run Statechart function and select Debug Statechart. The statechart diagram appears in debugging mode, which means you cannot edit the diagram.
 |
Note If you do not see the Debug Statechart option, you might have disabled statechart debugging. You must re-enable debugging and re-generate the code before proceeding. |
- Right-click any transition node or state and select Set Breakpoint. LabVIEW highlights the selected object in red.
When you reach a breakpoint during execution, the statechart pauses. You can take the following actions:
- Right-click the object and use the shortcut menu to display the guards and/or actions of that object.
- Single-step through execution by using the single-stepping buttons.
- Click the Pause button to continue running until the next breakpoint or until the statechart finishes executing.
Placing Breakpoints in a Guard or Action
You can place breakpoints in a guard or action by right-clicking an object on the block diagram and selecting Set Breakpoint. When an executing statechart encounters these breakpoints, LabVIEW pauses execution, and you can debug the guard or action similar to debugging a VI.