I was mistakenly assumed that we can debug a script component. As in, putting breakpoints and inspect the value of the variables at run time. But no, in SSIS we can not debug a script component. We can debug a script task, but not a script component. A script task is a control flow item, whereas a script component is a workflow item.
Because in the past I have debugged a script task, I thought we could debug a script component. So I put break points on the code in my script component and then execute the workflow task. Alas, the workflow did not stop at the breakpoint. It carries on. I thought my Visual Studio 2008 installation is not right, i.e. it did not integrate with SQL Server BIDS. So I tried on my laptop which only had SQL Server 2008 installed. I created a workflow with a script component and ran it and I got the same thing: SSIS did not stop at the break points inside the script component.
Then I read in MSDN that we can’t debug a script component: link. Because we can’t set breakpoints and inspect the variables, it suggests 4 methods:
- Message box (MessageBox.Show)
- Raise warning and error events
- Log messages
- Use a data viewer to see the output
In the end I did the debugging using the combination of:
- Message box
- Write to a text file (using SteamWriter)
- Set a package variable
[…] Remember that you can’t debug an SSIS Script Component (see my post here), but you can debug SSIS Script […]
Pingback by Importing a File with Dynamic Columns « Data Warehousing and Business Intelligence — 5 March 2011 @ 9:25 am |
[…] we can’t debug a Script Component (we can debug a Script Task, but not a Script Component, see here), hence we use message […]
Pingback by Update a Variable based on a File – Script Component « Data Warehousing and Business Intelligence — 7 June 2011 @ 7:16 pm |