Debugging Tasks Overview

The purpose of the Task Builder is to supply an interface that a task developer can use to visually construct the steps that an AutoMate task should perform when it is run. Additionally, the Task Builder provides a number of tools that can assist a developer to properly debug a task that generates an error or is generally not working properly. Try the following suggestions to help pinpoint the cause of an errant task:

Stepping through the task

"Stepping" is the process of executing an AutoMate task one step at a time. When you click the Run button (or press F5), task execution may occur so quickly that it is impossible to tell what is happening. Instead, try clicking the Step button , located to the far right of the Run button (or press F9). This will execute the step, then wait. This gives you a chance to evaluate the task in several ways:

To execute the next step, click the Step button again. You can also run the rest of the task at regular speed from this point forward by clicking the Run button.

Setting a Breakpoint

Breakpoints are very useful for larger tasks where stepping from the beginning of the task to a point of interest may be tedious and time consuming. Instead, you can tell the task to pause at a specific step by creating a breakpoint at that step. When the breakpoint is encountered, AutoMate will pause task execution. From here, you can follow the recommendations above, including stepping from this point forward by clicking the Step button, or continuing normal task execution by clicking the Run button. See Using Breakpoints for more information.

Setting a Watch

Watches provide a powerful means for watching the state of variables and expressions in your task. In larger tasks, where AutoMate Script steps, multiple Set Variable steps, or other more complex task steps are involved, watches are invaluable for seeing where and how variable values change. A watch can be simply a variable name to be examined, or it can be a complex expression that is reevaluated as the step executes. See Using Watches for more information.

Minimizing Task Builder on run

For tasks that make use of Interactivity Actions, or otherwise interact with various windows, set an option to minimize Task Builder as the task runs. Task Builder is minimized as the task runs, and restored when the task ends or encounters a breakpoint. This allows Interactivity and Window actions to work unobstructed.

To minimize Task Builder on run

  1. On the Task Builder Tools menu, click Editor Options.

  2. Click the Debugger tab, select Minimize on run and click OK.

See Also

About the Debug Window

Task Builder Debugger Options

About Breakpoints

About Watches

Testing Tasks