Problem: How to Debug a
variable flow and watch the variable as it passes through different tasks in
SSIS?
In a troubleshooting process of SSIS packages to know what it’s
compiling and run time values of variable we need to set break points on the
specific tasks to watch the variable at the time of entry and out of the task.
When you launch SSIS, in the designer you can see or enable
break points by right click anywhere in the design area. Or you can go to the
designer tab and navigate through the windows to get to the break points and
Add a new break point from there. Another quick way of watching the breakpoints
from the designer is to press(CTRL+ALT+B).
you can enable a break point on the component level or task
level. So, what happens in when you add a break point on the task there are few
conditions we can choose to break depending on the selection it will pause
executing when that condition hits and gives you time to watch the variable at
that moment it entered the task by stepping inside the break point.
After we enable the break point on the task or component the
designer will show a red dot on the task or component to indicate where the
break point is set.
Below is the list of options you get when you want to break
on the task.
Example:
In the example, I would like to show we can watch a variable
inside of for loop each time it executes the variable tries to increment so it
is something changes during run time.
To create a for loop please go through this article. for
loop
Step 0: Add Break point on the for loop at the component and
select pre execute and loop execution as below image.
Select options for breaking the task.
After adding break point you should be seeing a red dot on the container like below.
Step 1: Change the solution configuration to debug and then
execute task or package.
Step 2: you should see the package stops executing on the
for loop container as soon as hits the pre execution and open the break points
options whether to watch or continue
Step 3: open the watch window and select the variable
to watch and expand the arrow to watch values for each execution hit continue to
see until it exits the loop.
Output:
As you can see the variables value is watched inside the watch window.
0 comments:
Post a Comment