none
Debug Script task inside a nested ForEach

    Question

  • I have a nested Foreach loop container (simplified view below) that itself contains a script task. I am trying to get some Debug information out of it. I've set breakpoints in the code, I've added MessageBox.Show, I've written Debug.Writeline, Trace.Writeline, and nothing is emitting anything. I've pulled up the locals window also, and not even it is showing variable changes or anything within the task.

    I know the task is running because there are some data changes coming out of it.

    Any idea why I cannot debug the task?

    Friday, September 20, 2013 9:16 PM

Answers

  • You can debug a script task only when the below condition are satisfied.

    1.You can debug the Script task when you run the package in 64-bit mode.
     
    2.You must execute the package to debug into your Script task. If you execute only the individual task, breakpoints in the Script task code are ignored.

    3.You cannot debug a Script task when you run the Script task as part of a child package that is run from an Execute Package task. Breakpoints that you set in the Script task in the child package are disregarded in these circumstances. You can debug the child package normally by running it separately.

    4.When you debug a package that contains multiple Script tasks, the debugger debugs one Script task. The system can debug another Script task if the debugger completes, as in the case of a Foreach Loop or For Loop container.

    Refer http://technet.microsoft.com/en-us/library/ms135952.aspx


    Regards, RSingh


    Saturday, September 21, 2013 12:50 AM