Debugging SQL Server Store Procedure with Visual Studio

Step :
1.    Create connection from VS to database server
        •    Open “Server Explorer” tab
        •    Right click on data connection tree menu, and choose “Add Connection”


        •    On “Choose Data Source” window, choose “Microsoft SQL Server” as data source and “.NET Framework Data Provider for SQL Server” as data provider.


        •    Enter server name and database log on information, then choose database name.


2.    After database connection successfully created, open the SP and add a breakpoint by pressing F9.



3.    Right click on the SP want to debug, and choose “Step into Store Procedure”. 



4.    Fill the SP parameter and click “OK” button.


5.    Debugging process started. Use visual studio debugging tools to do Step Into (F11), Step Over(F10), Run (F5) and etc.



Note :
Tested on Visual Studio Prof 2005 and 2008 with SQL Server 2005 database 

Share this post: | | | |
Published Friday, October 24, 2008 2:39 PM by ekasinggih
Filed under:


No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems