Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
It is common to have to debug flows in case there are any changes in the system or if a desktop flow cannot run because it contains errors.
Debug a desktop flow using the following tools:
Run, stop, and pause in flow designer
Select Run or press F5 to run the flow. When the flow runs, Run becomes Pause. Select Pause or press Ctrl + Pause while the flow is running to pause and inspect any changes up to that point. Select Run while the flow is paused to resume it. The Run next action button and the F10 shortcut run the flow action by action and pause it after each action completes. The Stop button and the Shift + F5 shortcut stop the flow completely.
Adding breakpoints
Click to the left of the running order number in the workspace to place a breakpoint in the flow, which appears as a red dot. Add a breakpoint to specify at which action to pause the flow. Resume running the flow by selecting Run or Run next action. Select the breakpoint to remove it.
Run a desktop flow by action
The Run next action button runs the flow action by action. After each action is completed, the flow is paused. Open the variables pane to check the value of any variable at the point where it's paused. This feature is useful for debugging.
Step over and step out
Power Automate for desktop provides two additional debugging options: step over and step out. These features give you more control and visibility during flow execution.
To use these debugging features, you first need to enable stepping mode. Go to the Debug menu in the designer toolbar and turn on the Stepping Mode toggle.
When you activate stepping mode, you get two extra options in the flow designer:
- Step over, which you can trigger with the keyboard shortcut F11.
- Step out, which you can trigger with the keyboard shortcut Shift+F11.
These options are only available when the flow isn't running or is paused. A flow pauses in the following situations:
- You manually select a pause option.
- You select the Run next action option.
- Execution reaches a predefined breakpoint.
- You apply the step over option during execution.
- You apply the step out option during a subflow execution, except for the main subflow.
Step over
The step over command lets you execute actions one at a time while keeping control over the flow’s progression. When you use it before a Run subflow action, it runs the entire subflow and then pauses at the next action. For all other actions, step over runs the current actions and pauses at the next one.
Step out
The step out command exits an executing subflow and returns to its caller. If you apply it during a subflow, it completes that subflow and pauses after the corresponding Run subflow action in the parent flow. When you use it in the main subflow, step out works like the standard Run command and lets execution continue without interruption.
The status bar
The status bar on the bottom of the window shows the status of the flow and the number of the selected actions. Additionally, it shows the total number of actions and subflows in the current flow.
The Run delay field defines the time that the flow waits after running each action in the flow designer. You can modify the default value to increase or decrease the milliseconds that the flow waits.
The status bar also displays the number of errors, if any are present. Select the Errors option to pop up the Errors pane.
If you search inside the flow, the status bar shows an additional field containing the number of the results. Select this field to pop up the Find in code pane.
Run from here
To run the flow starting from a specific action, right-click the action and select Run from here. This ignores all previous actions and runs the flow from the selected action onwards.
Power Automate reserved keywords
A certain amount of words are being used in the core of Power Automate and can't be used during development in the variable, subflow, label or error block names. The list of these words is displayed below.
| A - E | F - J | K - R | S - Z |
|---|---|---|---|
| action | FALSE | label | set |
| and | for | loop | step |
| block | foreach | main | switch |
| call | from | mod | then |
| case | function | next | throw |
| default | global | no | times |
| disable | goto | not | to |
| else | if | on | TRUE |
| end | in | or | wait |
| error | input | output | while |
| exit | repeat | xor | |
| yes |