23
votes

It's simple but I can't make it work, and I read in so many places a lot of solutions but nothing worked for me. How can I accomplished this?

Note

I put a break point in my code and ran the entire package, but it still did not work.

5

5 Answers

31
votes

The Script component does not support the use of breakpoints. Therefore, you cannot step through your code and examine values as the package runs. You can monitor the execution of the Script component by using the following methods

Interrupt execution and display a modal message by using the MessageBox.Show() method in the System.Windows.Forms namespace. (Remove this code after you complete the debugging process.)

Raise events for informational messages, warnings, and errors. The FireInformation, FireWarning, and FireError methods display the event description in the Visual Studio Output window. However, the FireProgress method, the Console.Write method, and Console.WriteLine method do not display any information in the Output window. Messages from the FireProgress event appear on the Progress tab of SSIS Designer.

http://microsoft-ssis.blogspot.com/2011/04/breakpoint-does-not-work-within-ssis.html

6
votes

Breakpoints only work in a Script Task not in a Script Component

6
votes

My issue was using the 64-bit runtime - I noticed in my output the following message "Cannot debug script tasks when running under the 64 bit version of the Integration Services runtime".

This is easily fixed by running the 32-bit runtime (e.g. temporarily) as explained here.

1
votes

I know the MS Blog says that breakpoints do not function in Scripts, but MSDN seems to indicate that they do. Have you tried following the directions on MSDN?

1
votes

For SSIS 2008 where you can only debug the Script Task not the Script Component as already noted by Joost, I've had success using

Trace.Writeline("SSIS .....");

Then I'm capturing this output with good ol Dbgview.exe from https://docs.microsoft.com/en-us/sysinternals/downloads/debugview. I set Edit->Filter->Include SSIS* and then if you're going to leave this on your desktop set the Debug View History Depth to 99999 or it'll fill up the log with no size limit!