You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A [!INCLUDE[tsql](../../includes/tsql-md.md)].code snippet is a template containing the basic structure of a [!INCLUDE[tsql](../../includes/tsql-md.md)] statement or block. You can use snippets as a starting point when adding statements in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor. You can insert the pre-defined snippets supplied with SQL Server, or create your own.
17
-
18
+
19
+
A [!INCLUDE[tsql](../../includes/tsql-md.md)].code snippet is a template containing the basic structure of a [!INCLUDE[tsql](../../includes/tsql-md.md)] statement or block. You can use snippets as a starting point when adding statements in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor. You can insert the pre-defined snippets supplied with SQL Server, or create your own.
|Describes how to finish building a complete [!INCLUDE[tsql](../../includes/tsql-md.md)] statement or block after inserting a code snippet.|[Complete Transact-SQL Snippets](../../relational-databases/scripting/complete-transact-sql-snippets.md)|
25
28
|Describes how to build your own custom snippets and add them to the set of SQL Server snippets.|[Add Transact-SQL Snippets](../../relational-databases/scripting/add-transact-sql-snippets.md)|
26
29
27
-
## See Also
28
-
[Query and Text Editors (SQL Server Management Studio)](../../relational-databases/scripting/query-and-text-editors-sql-server-management-studio.md)
29
-
30
-
30
+
## See Also
31
+
32
+
[Query and Text Editors (SQL Server Management Studio)](../../relational-databases/scripting/query-and-text-editors-sql-server-management-studio.md)
The **Breakpoints** window lists all the breakpoints that are set in the current [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor. To manage the breakpoints, use the toolbar in the **Breakpoints** window. Breakpoints are locations in the code where execution pauses in debug mode so that you can view debugging data.
The **Call Stack** window displays the modules on the call stack, and the data types and values of any parameters that are passed to the modules. [!INCLUDE[tsql](../../includes/tsql-md.md)] modules include stored procedures, functions, and triggers. To display the call stack, you must be in debug mode.
19
-
20
-
## Task List
21
-
**To access the Call Stack window**
22
-
23
-
- On the **Debug** menu, click **Windows**, and then click **Call Stack**.
24
-
25
-
**To change the current Call Stack frame**
26
-
27
-
You can use either of the following procedures to make a stack frame the current frame:
28
-
29
-
- Right-click the stack frame, and then click **Switch To Frame**.
30
-
31
-
- Double-click the stack frame.
32
-
33
-
**To view the source of a frame other than the current frame**
34
-
35
-
- Right-click the stack frame, and then click **Go To Source Code**.
36
-
37
-
## Stack Frames
38
-
Each row in the **Call Stack** window is called a stack frame and represents either a call from a [!INCLUDE[tsql](../../includes/tsql-md.md)] script file to a module or a call from one module to another. The bottom stack frame in the display indicates the line in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor window that made the first call into the stack. The top row indicates the line on which the debugger paused execution, and is identified by a yellow arrow in the left margin of the window. Each intermediate row indicates the module and the line number of the source code that called the next higher stack frame.
39
-
40
-
All expressions in the **Locals**, **Watch**, and **QuickWatch** windows are evaluated based on the current stack frame. The Query Editor window displays the code for the current frame. By default, the current stack frame is the frame in which the [!INCLUDE[tsql](../../includes/tsql-md.md)] debugger paused execution. When you change the current stack frame to another frame, the expressions in the **Locals**, **Watch**, and **QuickWatch** windows are reevaluated in the context of the new frame, and the source code of the new frame is displayed in the Query Editor window.
41
-
42
-
## Columns
20
+
21
+
The **Call Stack** window displays the modules on the call stack, and the data types and values of any parameters that are passed to the modules. [!INCLUDE[tsql](../../includes/tsql-md.md)] modules include stored procedures, functions, and triggers. To display the call stack, you must be in debug mode.
- On the **Debug** menu, click **Windows**, and then click **Call Stack**.
30
+
31
+
**To change the current Call Stack frame**
32
+
33
+
You can use either of the following procedures to make a stack frame the current frame:
34
+
35
+
- Right-click the stack frame, and then click **Switch To Frame**.
36
+
37
+
- Double-click the stack frame.
38
+
39
+
**To view the source of a frame other than the current frame**
40
+
41
+
- Right-click the stack frame, and then click **Go To Source Code**.
42
+
43
+
## Stack Frames
44
+
45
+
Each row in the **Call Stack** window is called a stack frame and represents either a call from a [!INCLUDE[tsql](../../includes/tsql-md.md)] script file to a module or a call from one module to another. The bottom stack frame in the display indicates the line in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor window that made the first call into the stack. The top row indicates the line on which the debugger paused execution, and is identified by a yellow arrow in the left margin of the window. Each intermediate row indicates the module and the line number of the source code that called the next higher stack frame.
46
+
47
+
All expressions in the **Locals**, **Watch**, and **QuickWatch** windows are evaluated based on the current stack frame. The Query Editor window displays the code for the current frame. By default, the current stack frame is the frame in which the [!INCLUDE[tsql](../../includes/tsql-md.md)] debugger paused execution. When you change the current stack frame to another frame, the expressions in the **Locals**, **Watch**, and **QuickWatch** windows are reevaluated in the context of the new frame, and the source code of the new frame is displayed in the Query Editor window.
48
+
49
+
## Columns
50
+
43
51
**Name**
44
52
Displays information about a module on the call stack.
Use the **CommandWindow** to run commands, such as debug and edit commands, against the code in the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] Query Editor window that is currently being debugged. You must be in debug mode to use the **Command Window**. The [!INCLUDE[tsql](../../includes/tsql-md.md)] debugger supports many of the commands that are also supported in the [!INCLUDE[msCoName](../../includes/msconame-md.md)][!INCLUDE[vsprvs](../../includes/vsprvs-md.md)]**Command** window. For more information, see [Visual Studio Command Window](https://go.microsoft.com/fwlink/?LinkId=112007).
19
-
20
-
## Task List
21
-
**To access the Command Window**
22
-
23
-
- On the **Debug** menu, click **Start Debugging**.
24
-
25
-
**To print the value of a variable**
26
-
27
-
- In the **CommandWindow**, type **Debug.Print \<VariableName>**, and then press ENTER.
28
-
29
-
**To list information about the current thread**
30
-
31
-
- In the **CommandWindow**, type **Debug.ListThread**, and then press ENTER.
32
-
33
-
**To add a variable to the QuickWatch window**
34
-
35
-
- In the **CommandWindow**, type **Debug.QuickWatch \<VariableName>**, and then press ENTER.
Use the **CommandWindow** to run commands, such as debug and edit commands, against the code in the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] Query Editor window that is currently being debugged. You must be in debug mode to use the **Command Window**. The [!INCLUDE[tsql](../../includes/tsql-md.md)] debugger supports many of the commands that are also supported in the [!INCLUDE[msCoName](../../includes/msconame-md.md)][!INCLUDE[vsprvs](../../includes/vsprvs-md.md)]**Command** window. For more information, see [Visual Studio Command Window](https://go.microsoft.com/fwlink/?LinkId=112007).
The [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]**Error List** displays the syntax and semantic errors that are generated from the IntelliSense code in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor.
22
-
23
+
24
+
The [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]**Error List** displays the syntax and semantic errors that are generated from the IntelliSense code in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor.
The **Error List** provides the following functionality:
29
+
30
+
The **Error List** provides the following functionality:
25
31
26
32
- As you edit scripts, the **Error List** displays the errors and warnings produced by IntelliSense in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor.
Every time that the debugger pauses execution on a specific [!INCLUDE[tsql](../../includes/tsql-md.md)] statement, you can use the various debugger windows to view the current execution state.
24
-
25
+
26
+
Every time that the debugger pauses execution on a specific [!INCLUDE[tsql](../../includes/tsql-md.md)] statement, you can use the various debugger windows to view the current execution state.
In debugger mode, the debugger opens two windows at the bottom of the main [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] window. The debugger displays all its information in these two windows. Each of the debugger windows has tabs that you can select to control which set of information is displayed in the window. The left debugger window contains the **Locals**, **Watch1**, **Watch2**, **Watch3**, and **Watch4** tabs. The right debugger window contains the **Call Stack**, **Threads**, **Breakpoints**, **Command Window**, and **Output** tabs.
31
+
32
+
In debugger mode, the debugger opens two windows at the bottom of the main [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] window. The debugger displays all its information in these two windows. Each of the debugger windows has tabs that you can select to control which set of information is displayed in the window. The left debugger window contains the **Locals**, **Watch1**, **Watch2**, **Watch3**, and **Watch4** tabs. The right debugger window contains the **Call Stack**, **Threads**, **Breakpoints**, **Command Window**, and **Output** tabs.
27
33
28
34
> [!NOTE]
29
35
> The previous descriptions apply to the default locations of the debugger windows. You can drag a tab to move it from one window to another, or you can undock a tab to create a new window that you can put wherever you want.
The **Locals** window displays information about the local expressions in the current scope of the [!INCLUDE[tsql](../../includes/tsql-md.md)] debugger. The scope is set to the current call stack frame that is selected in the **Call Stack** window. You must be in debug mode to display the local expressions.
0 commit comments