none
How do i watch variable values during debugging ?

Answers

All replies

  • Yes. Use the Watch window.

    Covered here a little with a screenshot: http://blogs.conchango.com/jamiethomson/archive/2005/12/05/2462.aspx

    -Jamie

     

    Thursday, January 12, 2006 1:29 PM
  • First of all you have to set a breakpoint. To enter debug-mode. Run your program until the breakpoint breaks.

    There are several windows to watch your variables.

    Watch -window: you can Add Watches (Variables to follow) by right clicking on your Code or typing in the watch window.

    The other windows (Autos and Locals) work the same except The automatically look for interesting variables.

    I the command window you can enter command to know more about your variables:

    ? variable          prints the variable

    You can also set the variable to a new value using variable=...

     

    Thursday, January 12, 2006 1:35 PM
  • Currently variables are the only things you can watch in the Watch window.

     

    I reckon it'd be useful to watch any property of any task in the package. if you agree - vote for it here: http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=c53d07a9-4112-4423-95c3-092562c2112f and leave a comment.

    Thursday, January 12, 2006 2:05 PM
  • Yes i have a problem seing breakpoint in for example VB i a script component. I can set the breakpoint, but when i close the script windows in SSIS the coding windows closes as well. And when i run the package or open the script editor again, the breakpoint is gone
    Friday, January 13, 2006 11:17 PM
  • first you need to put brak point nd then second thing you need to specify Variable name in watch window for which you want to see the changes in value.

     

    consider below example:

    you have one  "Execute sql task" with oledb connection and second is "Execute sql task" with Flat file connection in your control flow.

    you have 2 package variables columnname of type string and column length of INT32 type.

    add break point to second "Execute sql task" (by selecting that object in control flow and pressing f9 ) and start debugging.

    when debugging come to that point and stops, add your variable names in watch window. as soon you add those names it will shows you current value of them.

    Wednesday, September 22, 2010 4:58 PM
  • You can also just drag and drop the variable from variable window to watch window during the 'debug' time.


    Friday, June 10, 2011 4:10 AM
  • First of all you have to set a breakpoint. To enter debug-mode. Run your program until the breakpoint breaks.

    There are several windows to watch your variables.

    Watch -window: you can Add Watches (Variables to follow) by right clicking on your Code or typing in the watch window.

    The other windows (Autos and Locals) work the same except The automatically look for interesting variables.

    I the command window you can enter command to know more about your variables:

    ? variable          prints the variable

    You can also set the variable to a new value using variable=...

     

    Very interesting, did not know you could do this 'command window' way. I tried out and found I have to hover the mouse over the varaible '? @varCountOfTables'

    in the 'locals' window, you can check/browse all variables or you can right click a variable and click 'add watch' which will make the variable to appear in the watch window too.

    Friday, June 10, 2011 4:37 AM
  • Hi all,

    Thanks for this post.

    http://consultingblogs.emc.com/jamiethomson/archive/2005/12/05/2462.aspx


    Thanks Shiven:) If Answer is Helpful, Please Vote

    Wednesday, March 28, 2012 10:24 AM
  • Just face it, sometimes this crap works and without doing anything special and then other times this crap doesn't work, for no rhyme or reason.  That is why it's crap.
    Wednesday, December 04, 2013 4:10 PM