Skip to content

Debugging a Stored Procedure via Direct Database Debugging

August 11, 2009

Direct Database Debugging is the simplest way to debug a SQL Server 2005 stored procedure. From Visual Studio’s IDE choose to step into a stored procedure and then step through each of its statements one at a time, inspecting and changing T-SQL variables and parameters within the stored procedure.

(Note: SQL Server debugging support is only available in the Team Systems and Professional editions of Visual Studio.)

The following demonstrate how to debug Store procedure through IDE.

1.      Open Server Explorer and drill down to the store procedure you want to debug.

2.      Right click the store procedure and choose the ¬タワStep Into Store Procedure¬タ? option        from the context menu.

3.      This will start the debugger and execute the stored procedure. If store procedure expects parameter, a dialog box prompts us to provide the value. Enter the value and click OK.

4.      Execution will start at the first statement of the store procedure. You can step from statement to statement using the Step Into or Step Over commands (F10 or F11 in the keyboard respectively).

5.      After the store procedure completes, the result can be viewed on the output window.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: