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

 All Forums
 Site Related Forums
 Article Discussion
 Article: Debugging Stored Procedures in Visual Studio 2005
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 06/26/2007 :  07:55:50  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
This article walks through the basics of debugging stored procedures using Visual Studio 2005. It covers breakpoints, watches and stepping through code. It was written by Chris Rock and includes his very unique sense of humor.

Read the article

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 06/26/2007 :  10:23:48  Show Profile  Visit spirit1's Homepage  Reply with Quote
well since THE Fonz says it's cool... i'm convinced. It's freakin' KEWL!

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp

Edited by - spirit1 on 06/26/2007 10:24:09
Go to Top of Page

chrisrock
Starting Member

12 Posts

Posted - 06/28/2007 :  09:05:32  Show Profile  Reply with Quote
quote:
Originally posted by spirit1

well since THE Fonz says it's cool... i'm convinced. It's freakin' KEWL!

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp



Thanks Spirit1. Fonz told me this was the coolest thing second only to jumping the shark.

Edited by - chrisrock on 06/28/2007 09:06:06
Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 06/28/2007 :  09:39:30  Show Profile  Visit spirit1's Homepage  Reply with Quote
he did?
wow... you must be very old then

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

jsmith8858
Dr. Cross Join

USA
7423 Posts

Posted - 06/28/2007 :  16:55:21  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
Two thumbs up for the article!

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

chrisrock
Starting Member

12 Posts

Posted - 06/30/2007 :  15:03:37  Show Profile  Reply with Quote
quote:
Originally posted by jsmith8858

Two thumbs up for the article!

- Jeff
http://weblogs.sqlteam.com/JeffS




Thanks Jeff!
Go to Top of Page

daos77
Starting Member

USA
1 Posts

Posted - 07/05/2007 :  10:19:44  Show Profile  Reply with Quote
Chrisrock,
Can you tell us why INSERT, SELECT statements and others are surrounded by a blue thin line?

Also while debugging, how can we see the results of executing a statement such as Select Column1, Column2 from TempTable1 in the watch window. I know that by putting the Select statement in a loop (I mean through a cursor) you could see the values at each iteration through the loop but what if your select brings back hundreds or thousands of rows? You can't just step through each iteration looking at values.
Similarly how about inserting into a temp table while in a loop.
Go to Top of Page

cassiep
Starting Member

USA
1 Posts

Posted - 04/16/2008 :  13:53:53  Show Profile  Reply with Quote
When I try to debug my stored procedure, it is not allowing me to hit the break point. It tells me ..... "The breakpoint will not be currently hit. Unable to bind SQL breakpoint at this time. Object containing the breakpoint is not loaded." Any suggestions?
Go to Top of Page

sheir
Starting Member

Canada
1 Posts

Posted - 06/05/2008 :  15:50:04  Show Profile  Reply with Quote
In Server Explorer of VS2008, I set a new DataConnection to a
SQL Server machine on the network.

I open a stored proc I want to debug (step into) and set some breakpoints.

Right-click on the proc and select step-into

get the Run Stored Procedure
fill in the values for the parameters (in and in/out)
click the Ok button

does not step into the proc, just runs it and i see my Print statements in the Debug output window


It the problem a permission issue and if so how do i go about fixing it.
Is there some simple easy step-by-step article for that?
Go to Top of Page

spisiak
Starting Member

1 Posts

Posted - 05/18/2009 :  05:39:25  Show Profile  Reply with Quote
I have visual studio 2005 standart. there isn't any choice "Step Into Stored Procedure".
I can't debug my stored procedur. Any suggestions?
Go to Top of Page

dackritchie
Starting Member

USA
1 Posts

Posted - 06/05/2009 :  10:51:08  Show Profile  Reply with Quote
I have the same problem as spisiak, and I'm using BI Development Studio. Is there an answer to this?
Go to Top of Page

stretchboy
Starting Member

USA
2 Posts

Posted - 09/02/2009 :  14:34:25  Show Profile  Reply with Quote
quote:
Originally posted by AskSQLTeam

This article walks through the basics of debugging stored procedures using Visual Studio 2005. It covers breakpoints, watches and stepping through code. It was written by <a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&id=29256">Chris Rock</a> and includes his very unique sense of humor.

<a href="/article/debugging-stored-procedures-in-visual-studio-2005">Read the article</a>



Thanks for the article. I have a question. How do I use the immediate/locals/watch window to view the contents of variables of type table? Lets say I do 'DECLARE @Temp TABLE(...)' and then I run and INSERT / SELECT into that temp table. Can I now use something to view the rows/fields or run a sql statement on it?

Thanks

I code therefore I am.
Go to Top of Page

stretchboy
Starting Member

USA
2 Posts

Posted - 09/02/2009 :  14:35:06  Show Profile  Reply with Quote
quote:
Originally posted by spisiak

I have visual studio 2005 standart. there isn't any choice "Step Into Stored Procedure".
I can't debug my stored procedur. Any suggestions?




Have to have VS 2005 Pro or higher for the 'Step into Procedure' command.

I code therefore I am.
Go to Top of Page

LightStamp
Starting Member

1 Posts

Posted - 10/02/2009 :  11:56:24  Show Profile  Reply with Quote
I'm using VS2005 and hitting a SQL2000 database. I try to step into a SP in VS2005 and it says the breakpoint will never be reached.
Using VS2005 Team edition. I've heard that the debug uses TCP/IP - is this the problem - do i need to configure something here?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.14 seconds. Powered By: Snitz Forums 2000