VS2015 debugging SQL Server stored Procedures

Source: Internet
Author: User
Tags microsoft sql server

After the stored procedure has been written, it is not certain that the requirements of the business logic are fully complied with and can be debugged to determine compliance. Debugging is available through Visual Studio, and there are three debugging methods in Visual Studio.

First, the database debugging directly.

Second, the application debugging.

Third, debug in the SQL Server project.

You can create a SQL Server project in Visual Studio. The project can contain T-SQL and database objects, and these database objects can be debugged through the SQL Server project itself.

This article briefly introduces the first method, and in the first method there are two different ways to debug the local and remote databases. Here is a brief introduction to the method of debugging stored procedures in the local database.

Debugging steps:

1. Open Visual Studio 2013, click View, and select Server Explorer.

2. Right click on "Data Connection" and select "Add Connection"

3. Select "Microsoft SQL Server" or "Microsoft SQL Server database File" in the Pop-up window

4, in the third step on the basis of configuration, this step according to the third step selection options, the content of the configuration is different, but are relatively simple, do not describe.

5. After adding the connection, click "Stored Procedure", select the stored procedure you want to debug, right click, select "Execute", and enter the corresponding parameter (if any) in the popup window.

6. Click the drop-down button to the right of the green button in the Open tab window and select "Execute with Debugger" to start debugging.

7, debugging, you can press F11 or F10 step or process into, debugging, debugging the mouse on the variable can see the value of the variable.

VS2015 debugging SQL Server stored Procedures

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.