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
 Site Related Forums
 Article Discussion
 Article: Debugging Stored Procedures in Visual Studio 2005

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-06-26 : 07:55:50
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

11752 Posts

Posted - 2007-06-26 : 10:23:48
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
Go to Top of Page

chrisrock
Starting Member

12 Posts

Posted - 2007-06-28 : 09:05:32
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.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-28 : 09:39:30
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

7423 Posts

Posted - 2007-06-28 : 16:55:21
Two thumbs up for the article!

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

chrisrock
Starting Member

12 Posts

Posted - 2007-06-30 : 15:03:37
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

1 Post

Posted - 2007-07-05 : 10:19:44
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

1 Post

Posted - 2008-04-16 : 13:53:53
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

1 Post

Posted - 2008-06-05 : 15:50:04
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 Post

Posted - 2009-05-18 : 05:39:25
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

1 Post

Posted - 2009-06-05 : 10:51:08
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

2 Posts

Posted - 2009-09-02 : 14:34:25
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

2 Posts

Posted - 2009-09-02 : 14:35:06
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 Post

Posted - 2009-10-02 : 11:56:24
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
   

- Advertisement -