Breakpoint can not be hit in script task of SSIS

Posted on 2011-08-09 23:04  hero is here  阅读(416)  评论(0)    收藏  举报

In the SSIS package, there are some script tasks. but some breakpoints inside script tasks can not be hit when debugging.

I encountered this issue last week and try to find out the root cause and solution. I confirm it is script task, not script component. From msdn, the breakpoint inside script component can not be hit, but the one in script task could be.

And yes, some breakpoints inside script task could be hit, but some can not.

I really confuse with this issue. I googled a lot of reference and it seems many people encounter issue, but no one give me the answer.

Tonight I googled this issue again and finally I get the answer from msdn http://msdn.microsoft.com/en-us/library/ms135952.aspx

When you debug a package that contains multiple Script tasks, the debugger hits breakpoints in only one Script task and will ignore breakpoints in the other Script tasks. If a Script task is part of a Foreach Loop or For Loop container, the debugger ignores breakpoints in the Script task after the first iteration of the loop.
 

Oh my god, Now I understand why some breakpoints can not be hit. So now I clear all breakpoints and set only one breakpoint in the script task which I want to debug. Now everything is fine.

So please remember: set only one breakpoint in SSIS package and then everything could work fine.

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3