Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watching variables in SSIS during debug

I have a project in SSIS and I've added an Execute SQL Task which sends its result out to a variable. I wanted to confirm the value because I was worried that it would try to write it out as a resultset object rather than an actual integer (in this case I'm returning a COUNT).

My first thought was just to run it in debug mode and add the global variable to my Watch window. Unfortunately, when I right-click on the Watch window, the option to "Add Variable" is greyed out. What am I missing here?

I've gotten around confirming that my variable is set correctly, so I'm not interested in methods like putting a script in to do a MsgBox with the value or anything like that. For future reference I'd like to be able to watch variables in debug mode. If there are some kind of constraints on that then I'd like to know the what and why of it all if anyone knows.

The help is woefully inadequate on this one and every "tutorial" that I can find just says, "Add the variable to the Watch window and debug" as though there should never be a problem doing that.

Thanks for any insight!

like image 496
Tom H Avatar asked Feb 24 '09 15:02

Tom H


People also ask

How do I view variables in SSIS package?

By default, the Variables window is located below the Connection Managers area in the SSIS Designer, in SQL Server Data Tools (SSDT). If you don't see the Variables window, click Variables on the SSIS menu to display the window. You can optionally display the Variables window by mapping the View.

Which of the following Windows displays the variables while debugging?

The Autos and Locals windows show variable values while you are debugging. The windows are only available during a debugging session. The Autos window shows variables used around the current breakpoint.


2 Answers

I believe you can only add variables to the Watch window while the debugger is stopped on a breakpoint. If you set a breakpoint on a step, you should be able to enter variables into the Watch window when the breakpoint is hit. You can select the first empty row in the Watch window and enter the variable name (you may or may not get some Intellisense there, I can't remember how well that works.)

like image 124
Dave Swersky Avatar answered Oct 20 '22 02:10

Dave Swersky


Drag the variable from Variables pane to Watch pane and voila!

like image 27
internetuser0x00 Avatar answered Oct 20 '22 04:10

internetuser0x00