Why the breakpoints that I set in my “Script Task” (not “Script Component” in the Data Flow *) never hits ?
Why the breakpoints that I set in my “Script Task” (not “Script Component” in the Data Flow *) never hits ?
On a Windows 2008 x64 machine, you’re running SQL Server 2008 x64. Let’s say you added a single “Script Task”; you wrote a very simple MessageBox.Show(“Hello World”); line and put a breakpoint to this MessageBox.Show() line. Of course you should save your script to be able to run your SSIS package. Now you saved your script and returned to the main “Control Flow” and you see your “Script Task” there. You also see a circle on your script task which is telling you that it has a breakpoint in it. So far so good…
But when you saved your package it shows up the message box with “Hello World” although it should hit to your breakpoint and should show the line it hit. But it didn’t.
To be able to have the debugger hit your breakpoint, you should change your SSIS Project’s “Run64BitRuntime” propery’s value from its default True to False as follows :
But that’s not enough. Because your “Script Task” is still compiled as 64bit. You should edit your Script Task with “Edit Script” and save it again. This will help your script task code to be compiled as 32bit.
Now, you can run your package and you will see that the breakpoint hits (of course if it “really” needs to hit the line(s) you set 🙂 )
* : This applies to “Script Task” not to a “Script Component” you put in a Data Flow Task. To see the ways for debugging your code in “Script Component”, please refer to our article titled as “Coding and Debugging the Script Component” in http://msdn.microsoft.com/en-us/library/ms136033.aspx .