Similarly, to remove a variable, right-click the name of the variable in the Watch window and click “Delete Watch” from the list of options. To add a variable to the Watch window, simply select the variable, right click and then select “Add Watch” as shown in the following screenshot: The only difference is that you can add to or remove variables from the Watch window, which can be useful when working with large numbers of variables in larger scripts. The Watch window is very similar to the Locals window. WHILE ( LowerRange Windows -> Locals as shown below: If the line of script being executed doesn’t contain any call to the stored procedure in SQL Server. It is important to mention that Step Into works like Step Over. Step Into lets you break into the stored procedure script from the script that calls that stored procedure. This is one of the most important and useful debugging features. For instance, if the debugger is at the following location in the script:Ĭlicking Step Over or pressing F10 simply moves the cursor to the following line: Step Over simply moves the cursor to the next line of executable script. You can see these options by clicking Debug as shown in the screenshot below: There are three options to step through the code: 1) Step Over, 2) Step Into and 3) Step Out. Now you have started debugging you can step through the code. To start debugging a SQL server stored procedure in SQL Server, press ALT + F5, or go to Debug -> Start Debugging, as shown in the figure below:Īfter starting the debugger in the window where you are calling your stored procedure in SQL Server, you will see that there will be a yellow cursor at the start of the query window as shown below: In SQL Server Management Studio, you have a variety of debugging options.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |