Compartir a través de


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 https://msdn.microsoft.com/en-us/library/ms136033.aspx .

Comments

  • Anonymous
    February 18, 2011
    I knew it and done it before like 6 months ago, but forgot, now thanks for reminding me of how to do it again :)

  • Anonymous
    February 24, 2011
    This Worked Thank u Very much...

  • Anonymous
    November 15, 2011
    Good solved my problem

  • Anonymous
    March 19, 2012
    Thank you Faruk.  I had exactly that problem, and your solution works fine.

  • Anonymous
    March 19, 2012
    @Bill, It's my pleasure hearing that this post helped you :)

  • Anonymous
    June 24, 2012
    Didn't work. My designer won't open.

  • Anonymous
    February 25, 2013
    Its worked for me thanks

  • Anonymous
    March 04, 2013
    wow...was struggling with this puzzel and here's the answer..worked like magic :)

  • Anonymous
    July 16, 2013
    Thanks , worked for me too

  • Anonymous
    July 30, 2013
    Thanks man! This helped me a lot after struggling with this issue.

  • Anonymous
    July 30, 2013
    It's great to hear that it helped you TC, Krupa, vasudha, Praveen :)

  • Anonymous
    February 25, 2014
    great !! helped me to overcome this problem.

  • Anonymous
    February 25, 2014
    But why should we have to dig this deep to find some obscure setting just to hit a breakpoint...sheesh!

  • Anonymous
    November 18, 2014
    Still not hitting a breakpoint. No idea why. This is awful

  • Anonymous
    April 06, 2015
    it is work for me that is realy great you saved my day

  • Anonymous
    October 01, 2015
    thank you! you saved my day

  • Anonymous
    February 28, 2016
    How obscure! This should be on the MSDN page for the script task. Great tip, thanks - probably saved me many hours of frustration.

  • Anonymous
    May 19, 2016
    It is not resolving my problem. The script task get open but never hit the breakpoint it just keep on running.

  • Anonymous
    March 12, 2017
    Hi Faruk,Thanks.i had same issue and fixed it in very less time by following this blog.thanks for saving our time.

  • Anonymous
    June 07, 2017
    Thanks a lot.