Share via


How to: Debug a Script by Setting Breakpoints in a Script Task

This procedure describes how to set breakpoints in the scripts that are used in the Script task.

After you set breakpoints in the script for the Script task, the Set Breakpoints - <object name> dialog box lists the breakpoints with the built-in breakpoints available in the Script task.

Note

The Script task supports the use of breakpoints during debugging, but the Script component does not have support for breakpoints. For suggestions on debugging 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.

To set a breakpoint in script

  1. In Business Intelligence Development Studio, open the Integration Services project that contains the package you want.

  2. Double-click the package that contains the script in which you want to set breakpoints.

  3. To open the Script task, click the Control Flow tab, and then double-click the Script task.

  4. Click Script and then click Edit Script.

  5. In Microsoft Visual Studio Tools for Applications (VSTA), locate the line of script on which you want to set a breakpoint, right-click that line, point to Breakpoint, and then click Insert Breakpoint.

    The breakpoint icon appears on the line of code.

  6. On the File menu, click Exit.

  7. Click OK.

  8. To save the package, click Save Selected Items on the File menu.