Debugging Script
You write the scripts that the Script task uses in Microsoft Visual Studio Tools for Applications (VSTA).
You set and script breakpoints in VSTA. You can manage breakpoints in VSTA, but you can also manage the breakpoints using the Set Breakpoints dialog box that SSIS Designer provides. For more information, see Debugging Control Flow.
Note
The Script task supports the use of breakpoints during debugging, but the Script component does not have support for breakpoints. For suggestions about how to debug the Script component, see Coding and Debugging the Script Component.
Note
When you debug a package that contains multiple Script tasks, the debugger hits breakpoints in only one Script task and will ignore breakpoints in the other Script tasks. If a Script task is part of a Foreach Loop or For Loop container, the debugger ignores breakpoints in the Script task after the first iteration of the loop.
The Set Breakpoints dialog box includes the script breakpoints. These breakpoints appear at the bottom of the breakpoint list, and display the line number and the name of the function in which the breakpoint appears. You can delete a script breakpoint from the Set Breakpoints dialog box.
At run time, the breakpoints set on lines of code in the Script task are integrated with the breakpoints set on the package or the tasks and containers in the package. The debugger can run from a breakpoint in the script to a breakpoint set on the package, task, or container, and vice versa. For example, a package might have breakpoints set on the break conditions that occur when the package receives the OnPreExecute and OnPostExecute events, and also have a Script task that has breakpoints on lines of its script. In this scenario, the package can suspend execution on the break condition associated with the OnPreExecute event, run to the breakpoints in the script, and finally run to the break condition associated with the OnPostExecute event.
However, you cannot debug a Script task if the task is being executed as part of a child package called by an Execute Package task. Breakpoints that you set within the Script task in the child package are disregarded in these circumstances.
To set a breakpoint in Visual Studio for Applications
|