Chapter 41. Using Breakpoints
When you are developing a package, many times you will need to troubleshoot issues in the package. It is helpful to know the status of data, variables, and tasks at certain points in the execution of the package. Breakpoints allow you to stop a package during execution and view the status of these items. Breakpoints also allow you to see value of variables immediately before and after a task.
To create a breakpoint on a task, right-click the task and select Edit Breakpoints. This action opens the Set Breakpoints window as shown in Figure 41-1. The left-hand column of this window is a set of check boxes that enable the breakpoint listed. Figure 41-1 shows the Set Breakpoints window for a For Loop Container. Notice the last breakpoint option is "Break at the beginning of every iteration of the loop." This option is available only on the For Loop and Foreach Loop.
Figure 41-1. Figure 41-1
Each option in the Set Breakpoints window will stop the package execution at a different point during in the task:
OnPreExecute—Just before the task executes
OnPostExecute—Directly after the task completes
OnError—When an error occurs in the task
OnWarning—When a warning occurs in the task
OnInformation—When the task provides information
OnTaskFailed—When the task fails
OnProgress—To update progress on task execution
OnQueryCancel—When the task can cancel execution