Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Pushing Data fromT-SQL to VS While Debugging

Author  Topic 

matt_1ca
Starting Member

2 Posts

Posted - 2013-04-07 : 04:37:06
I am debugging my T-SQL code in Visual Studio ... is it possible for me to write something in my Transact-SQL code and have it pushed in either the Output Window or Immediate Window of Visual Studio... if yes how do I do it?

If I were writing a VB code for example it is simple .. I can just write debug.print "text write" ... and boom the text I want to end up in the Immediate Window gets there ... so how about in T-SQL being debugged in VS, how is it done?

I have spent hours in books and google without getting any closer to the answer I am seeking and I am hoping people out there who have more experience would shed light and give me some enlightenment on this.

This technique if possible would help me a lot in my debugging work. Thanks so much for all the help.

Matt

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2013-04-09 : 17:24:56
use PRINT command, will that work for you?

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-10 : 00:45:46
http://support.microsoft.com/kb/316549

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

matt_1ca
Starting Member

2 Posts

Posted - 2013-04-12 : 00:48:43
Thank you all for the great response..

It's my first time to post a thread here and I can already see ... this place rocks!

I think I have discovered a way to do it: By simply doing something like (Select 'My text here') at
critical points of my code (including inside event handler catch) then it ends up automatically
where I want to see it so that I can examine the program flow..

Thanks again for all the help I really appreciate it.

Matt
Go to Top of Page
   

- Advertisement -