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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Pushing Data fromT-SQL to VS While Debugging
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 04/07/2013 :  04:37:06  Show Profile  Reply with Quote
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.


Edited by - matt_1ca on 04/07/2013 04:43:25

Flowing Fount of Yak Knowledge

1635 Posts

Posted - 04/09/2013 :  17:24:56  Show Profile  Click to see yosiasz's MSN Messenger address  Reply with Quote
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

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 04/10/2013 :  00:45:46  Show Profile  Reply with Quote

SQL Server MVP
Go to Top of Page

Starting Member

2 Posts

Posted - 04/12/2013 :  00:48:43  Show Profile  Reply with Quote
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.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.72 seconds. Powered By: Snitz Forums 2000