Saturday, February 25, 2012

Debugging Stored Procedures with Visual Studio.net has stopped working

Hi, I used to be able to debug stored procedures via Visual Studio.net 2003. However, this has stopped working. It does not produce an error just simply doesn't work anymore i.e. the breakpoints are by-passed.
I have the correct settings in the Debug configuration section. If any-one knows how to rectify this your help would be appreciated.
I have thought about re-installing the remote debugging functionality on the server. However, our Visual Studio.net discs are with a developer who is away at present.

Thanks in advance
LeeIf any-one else has the same problem, we've solved it. Here's how and why it happened.

We installed Service pack 3 of SQL server and overlooked some of the release notes. This installation was the culprit. To get debugging back working again we needed to execute the statement.

sp_sdidebug legacy_on

via Query Analyzer on our sql server.

Cheers
Lee|||Hi, i try to debug a store procedure in SQL Server. I do an example.
1.Open Server Explorer.

2.Under the Servers node in Server Explorer, expand the SQL Server machine name, expand the SQL Servers node, expand the SQL Server instance, expand the Northwind database node, and then expand the stored procedures node.

3.Right-click the CustOrderHist stored procedure and then click Step Into Stored Procedure.

4.The Run stored procedure dialog box opens, which lists the parameters of the stored procedure. Type ALFKI as the value for the @.CustomerID input parameter and then click OK.

5.In the Visual Studio design environment, a window opens that displays the text of the stored procedure. The first executable line of the stored procedure is highlighted. Press F11 to step through the stored procedure to completion.

6.In the Output window, the following message is displayed, which indicates successful execution:
The program 'SQL Debugger: T-SQL' has exited with code 0 (0x0)

But in step 5, the first executable line of the stored procedure is not highlighted, so I can't press F11 to step through.

Please help me

No comments:

Post a Comment