Skip to content

Commit 7f5b1f5

Browse files
authored
Merge pull request #31688 from erinstellato-ms/debugger
Debugger articles for SSDT
2 parents 0c20096 + 766bf66 commit 7f5b1f5

37 files changed

Lines changed: 956 additions & 1397 deletions

.openpublishing.redirection.json

Lines changed: 108 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55292,17 +55292,17 @@
5529255292
},
5529355293
{
5529455294
"source_path": "docs/relational-databases/scripting/specify-a-breakpoint-action.md",
55295-
"redirect_url": "/sql/ssms/scripting/specify-a-breakpoint-action",
55295+
"redirect_url": "/sql/ssdt/debugger/specify-breakpoint-action",
5529655296
"redirect_document_id": true
5529755297
},
5529855298
{
5529955299
"source_path": "docs/relational-databases/scripting/specify-a-breakpoint-condition.md",
55300-
"redirect_url": "/sql/ssms/scripting/specify-a-breakpoint-condition",
55300+
"redirect_url": "/sql/ssdt/debugger/specify-breakpoint-condition",
5530155301
"redirect_document_id": true
5530255302
},
5530355303
{
5530455304
"source_path": "docs/relational-databases/scripting/specify-a-breakpoint-filter.md",
55305-
"redirect_url": "/sql/ssms/scripting/specify-a-breakpoint-filter",
55305+
"redirect_url": "/sql/ssdt/debugger/specify-breakpoint-filter",
5530655306
"redirect_document_id": true
5530755307
},
5530855308
{
@@ -62789,6 +62789,111 @@
6278962789
"source_path": "docs/ssdt/how-to-clone-an-existing-database.md",
6279062790
"redirect_url": "/sql/t-sql/statements/create-table-as-clone-of-transact-sql",
6279162791
"redirect_document_id": false
62792+
},
62793+
{
62794+
"source_path": "docs/ssdt/how-to-debug-stored-procedures.md",
62795+
"redirect_url": "/sql/ssdt/debugger/debug-stored-procedures",
62796+
"redirect_document_id": false
62797+
},
62798+
{
62799+
"source_path": "docs/ssms/scripting/transact-sql-debugger.md",
62800+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62801+
"redirect_document_id": false
62802+
},
62803+
{
62804+
"source_path": "docs/ssms/scripting/configure-firewall-rules-before-running-the-tsql-debugger.md",
62805+
"redirect_url": "/sql/ssdt/debugger/configure-firewall-rules-before-running-tsql-debugger",
62806+
"redirect_document_id": false
62807+
},
62808+
{
62809+
"source_path": "docs/ssms/scripting/run-the-transact-sql-debugger.md",
62810+
"redirect_url": "/sql/ssdt/debugger/run-transact-sql-debugger",
62811+
"redirect_document_id": false
62812+
},
62813+
{
62814+
"source_path": "docs/ssms/scripting/step-through-transact-sql-code.md",
62815+
"redirect_url": "/sql/ssdt/debugger/step-through-transact-sql-code",
62816+
"redirect_document_id": false
62817+
},
62818+
{
62819+
"source_path": "docs/ssms/scripting/transact-sql-breakpoints.md",
62820+
"redirect_url": "/sql/ssdt/debugger/transact-sql-breakpoints",
62821+
"redirect_document_id": false
62822+
},
62823+
{
62824+
"source_path": "docs/ssms/scripting/toggle-a-breakpoint.md",
62825+
"redirect_url": "/sql/ssdt/debugger/toggle-breakpoint",
62826+
"redirect_document_id": false
62827+
},
62828+
{
62829+
"source_path": "docs/ssms/scripting/enable-disable-and-delete-breakpoints.md",
62830+
"redirect_url": "/sql/ssdt/debugger/enable-disable-delete-breakpoints",
62831+
"redirect_document_id": false
62832+
},
62833+
{
62834+
"source_path": "docs/ssms/scripting/specify-a-breakpoint-condition.md",
62835+
"redirect_url": "/sql/ssdt/debugger/specify-breakpoint-condition",
62836+
"redirect_document_id": false
62837+
},
62838+
{
62839+
"source_path": "docs/ssms/scripting/specify-a-hit-count.md",
62840+
"redirect_url": "/sql/ssdt/debugger/specify-hit-count",
62841+
"redirect_document_id": false
62842+
},
62843+
{
62844+
"source_path": "docs/ssms/scripting/specify-a-breakpoint-filter.md",
62845+
"redirect_url": "/sql/ssdt/debugger/specify-breakpoint-filter",
62846+
"redirect_document_id": false
62847+
},
62848+
{
62849+
"source_path": "docs/ssms/scripting/specify-a-breakpoint-action.md",
62850+
"redirect_url": "/sql/ssdt/debugger/specify-breakpoint-action",
62851+
"redirect_document_id": false
62852+
},
62853+
{
62854+
"source_path": "docs/ssms/scripting/transact-sql-debugger-information.md",
62855+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger-information",
62856+
"redirect_document_id": false
62857+
},
62858+
{
62859+
"source_path": "docs/ssms/scripting/transact-sql-debugger-error-list-window.md",
62860+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62861+
"redirect_document_id": false
62862+
},
62863+
{
62864+
"source_path": "docs/ssms/scripting/transact-sql-debugger-breakpoints-window.md",
62865+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62866+
"redirect_document_id": false
62867+
},
62868+
{
62869+
"source_path": "docs/ssms/scripting/transact-sql-debugger-call-stack-window.md",
62870+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62871+
"redirect_document_id": false
62872+
},
62873+
{
62874+
"source_path": "docs/ssms/scripting/transact-sql-debugger-locals-window.md",
62875+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62876+
"redirect_document_id": false
62877+
},
62878+
{
62879+
"source_path": "docs/ssms/scripting/transact-sql-debugger-threads-window.md",
62880+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62881+
"redirect_document_id": false
62882+
},
62883+
{
62884+
"source_path": "docs/ssms/scripting/transact-sql-debugger-command-window.md",
62885+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62886+
"redirect_document_id": false
62887+
},
62888+
{
62889+
"source_path": "docs/ssms/scripting/transact-sql-debugger-output-window.md",
62890+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62891+
"redirect_document_id": false
62892+
},
62893+
{
62894+
"source_path": "docs/ssms/scripting/transact-sql-debugger-watch-window.md",
62895+
"redirect_url": "/sql/ssdt/debugger/transact-sql-debugger",
62896+
"redirect_document_id": false
6279262897
}
6279362898
]
6279462899
}

docs/ssms/scripting/configure-firewall-rules-before-running-the-tsql-debugger.md renamed to docs/ssdt/debugger/configure-firewall-rules-before-running-tsql-debugger.md

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,31 @@ description: Learn how to configure the Windows Firewall rules before running th
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/31/2023
7+
ms.date: 08/28/2024
88
ms.service: sql
9-
ms.subservice: ssms
9+
ms.subservice: ssdt
1010
ms.topic: conceptual
11-
f1_keywords:
12-
- "vs.debug.error.sqlde_accessdenied"
13-
- "vs.debug.error.sqlde_register_failed"
14-
- "vs.debug.error.sqlde_firewall.remotemachines"
15-
helpviewer_keywords:
16-
- "Transact-SQL debugger, remote connections"
17-
- "Windows Firewall [Database Engine], Transact-SQL debugger"
18-
- "Transact-SQL debugger, Windows Firewall"
19-
- "Transact-SQL debugger, configuring"
20-
- "ports [SQL Server], Transact-SQL debugger"
21-
- "TCP/IP [SQL Server], port numbers"
22-
monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current"
2311
---
2412
# Configure firewall rules before running the Transact-SQL debugger
2513

2614
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2715

2816
Windows Firewall rules must be configured to enable [!INCLUDE [tsql](../../includes/tsql-md.md)] debugging when connected to an instance of the [!INCLUDE [ssDE](../../includes/ssde-md.md)] that is running on a different computer than the [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor.
2917

30-
[!INCLUDE [ssms-old-versions](../../includes/ssms-old-versions.md)]
31-
3218
## Configure the Transact-SQL debugger
3319

34-
The [!INCLUDE [tsql](../../includes/tsql-md.md)] debugger includes both server-side and client-side components. The server-side debugger components are installed with each instance of the Database Engine from [!INCLUDE [ssVersion2005](../../includes/ssversion2005-md.md)] Service Pack 2 (SP2) or later versions. The client-side debugger components are included:
35-
36-
- When you install the client-side tools from [!INCLUDE [sql2008-md](../../includes/sql2008-md.md)] or later versions
20+
The [!INCLUDE [tsql](../../includes/tsql-md.md)] debugger includes both server-side and client-side components. The server-side debugger components are installed with each instance of the [!INCLUDE [ssdenoversion-md](../../includes/ssdenoversion-md.md)]. The client-side debugger components are included:
3721

38-
- When you install Microsoft Visual Studio 2010 or later versions
22+
- When you install Microsoft Visual Studio 2019 or later versions
3923

4024
- When you install [!INCLUDE [ssBIDevStudioFull](../../includes/ssbidevstudiofull-md.md)] from the web download
4125

42-
There are no configuration requirements to run the [!INCLUDE [tsql](../../includes/tsql-md.md)] debugger when SQL Server Management Studio or [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] is running on the same computer as the instance of the [!INCLUDE [ssDEnoversion](../../includes/ssdenoversion-md.md)]. However, to run the [!INCLUDE [tsql](../../includes/tsql-md.md)] debugger when connected to a remote instance of the [!INCLUDE [ssDE](../../includes/ssde-md.md)], program and port rules in the Windows Firewall must be enabled on both computers. These rules may be created by [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] setup. If you get errors attempting to open a remote debugging session, ensure the following firewall rules are defined on your computer.
26+
There are no configuration requirements to run the [!INCLUDE [tsql](../../includes/tsql-md.md)] debugger when [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] is running on the same computer as the instance of the [!INCLUDE [ssDEnoversion](../../includes/ssdenoversion-md.md)]. However, to run the [!INCLUDE [tsql](../../includes/tsql-md.md)] debugger when connected to a remote instance of the [!INCLUDE [ssDE](../../includes/ssde-md.md)], program and port rules in the Windows Firewall must be enabled on both computers. If you get errors attempting to open a remote debugging session, ensure the following firewall rules are defined on your computer.
4327

4428
Use the **Windows Firewall with Advanced Security** application to manage the firewall rules. In both [!INCLUDE [win7](../../includes/win7-md.md)] and [!INCLUDE [winserver2008r2](../../includes/winserver2008r2-md.md)], open **Control Panel**, open **Windows Firewall**, and select **Advanced settings**. In [!INCLUDE [winserver2008r2](../../includes/winserver2008r2-md.md)], you can also open **Service Manager**, expand **Configuration** in the left pane, and expand **Windows Firewall with Advanced Security**.
4529

4630
> [!CAUTION]
47-
> Enabling rules in the Windows Firewall may expose your computer to security threats that the firewall is designed to block. Enabling rules for remote debugging unblocks the ports and programs listed in this topic.
31+
> Enabling rules in the Windows Firewall can expose your computer to security threats that the firewall is designed to block. Enabling rules for remote debugging unblocks the ports and programs listed in this topic.
4832
4933
## Firewall rules on the server
5034

@@ -56,7 +40,7 @@ On the computer that is running the instance of the [!INCLUDE [ssDE](../../inclu
5640

5741
1. In the **Rule Type** dialog, select **Program**, and then select **Next**.
5842

59-
1. In the **Program** dialog, select **This program path:** and enter the full path to `sqlservr.exe` for this instance. By default, `sqlservr.exe` is installed in `C:\Program Files\Microsoft SQL Server\MSSQL13.<InstanceName>\MSSQL\Binn`, where `<InstanceName>` is `MSSQLSERVER` for the default instance, and the instance name for any named instance.
43+
1. In the **Program** dialog, select **This program path:** and enter the full path to `sqlservr.exe` for this instance. By default, `sqlservr.exe` is installed in `C:\Program Files\Microsoft SQL Server\MSSQL16.<InstanceName>\MSSQL\Binn`, where `<InstanceName>` is `MSSQLSERVER` for the default instance, and the instance name for any named instance.
6044

6145
1. In the **Action** dialog, select **Allow the connection**, and select **Next**.
6246

@@ -70,7 +54,7 @@ On the computer that is running the instance of the [!INCLUDE [ssDE](../../inclu
7054

7155
1. Select **TCP** in the **Protocol type:** box, select **RPC Dynamic Ports** in the **Local port:** box, select **Apply**, and then select **OK**.
7256

73-
- Add an inbound program rule for `svchost.exe` to enable DCOM communications from remote debugger sessions.
57+
- Add an inbound program rule for `svchost.exe` to enable Distributed Component Object Model (DCOM) communications from remote debugger sessions.
7458

7559
1. In **Windows Firewall with Advanced Security**, in the left pane, right-click **Inbound Rules**, and then select **New Rule** in the action pane.
7660

@@ -94,7 +78,7 @@ On the computer that is running the instance of the [!INCLUDE [ssDE](../../inclu
9478

9579
## Firewall rules on the client
9680

97-
On the computer that is running the [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor, the SQL Server setup or [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] setup may have configured the Windows Firewall to allow remote debugging.
81+
On the computer that is running the [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor, configure the Windows Firewall to allow remote debugging.
9882

9983
If you get errors attempting to open a remote debugging session, you can manually configure the program and port exceptions by using **Windows Firewall with Advanced Security** to configure firewall rules:
10084

@@ -118,23 +102,21 @@ If you get errors attempting to open a remote debugging session, you can manuall
118102

119103
1. Select **TCP** in the **Protocol type:** box, select **RPC Endpoint Mapper** in the **Local port:** box, select **Apply**, and then select **OK**.
120104

121-
- Add a program entry for the application hosting the [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor. If you need to open remote debugging sessions from both SQL Server Management Studio and [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] on the same computer, you must add a program rule for both:
105+
- Add a program entry for the application hosting the [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor. If you need to open remote debugging sessions from multiple installations of [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] on the same computer, you must add a program rule for both:
122106

123107
1. In **Windows Firewall with Advanced Security**, in the left pane, right-click **Inbound Rules**, and then select **New Rule** in the action pane.
124108

125109
1. In the **Rule Type** dialog, select **Program**, and then select **Next**.
126110

127111
1. In the **Program** dialog, select **This program path:** and enter one of these three values.
128112

129-
- For SQL Server Management Studio, enter the full path to ssms.exe. By default, ssms.exe is installed in `C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\Management Studio`.
130-
131113
- For [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] enter the full path to `devenv.exe`:
132114

133-
1. By default, the `devenv.exe` for Visual Studio 2010 is in `C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE`.
115+
1. By default, the `devenv.exe` for Visual Studio 2022 is in `C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE`.
134116

135-
1. By default, the `devenv.exe` for Visual Studio 2012 is in `C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE`.
117+
1. By default, the `devenv.exe` for Visual Studio 2019 is in `C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE`.
136118

137-
1. You can find the path to ssms.exe from the shortcut you use to launch SQL Server Management Studio. You can find the path to `devenv.exe` from the shortcut you use to launch [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)]. Right-click the shortcut and select **Properties**. The executable and path are listed in the **Target** box.
119+
1. You can find the path to `devenv.exe` from the shortcut you use to launch [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)]. Right-click the shortcut and select **Properties**. The executable and path are listed in the **Target** box.
138120

139121
1. In the **Action** dialog, select **Allow the connection**, and select **Next**.
140122

@@ -152,18 +134,18 @@ If you get errors attempting to open a remote debugging session, you can manuall
152134

153135
All attempts to start the [!INCLUDE [tsql](../../includes/tsql-md.md)] debugger must also meet the following requirements:
154136

155-
- SQL Server Management Studio or [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] must be running under a Windows account that is a member of the **sysadmin** fixed server role.
137+
- [!INCLUDE [ssBIDevStudio](../../includes/ssbidevstudio-md.md)] must be running under a Windows account that is a member of the **sysadmin** fixed server role.
156138

157139
- The [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor window must be connected by using either a Windows Authentication or [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Authentication login that is a member of the **sysadmin** fixed server role.
158140

159-
- The [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor window must be connected to an instance of the [!INCLUDE [ssDE](../../includes/ssde-md.md)] from [!INCLUDE [ssVersion2005](../../includes/ssversion2005-md.md)] Service Pack 2 (SP2) or later versions. You can't run the debugger when the Query Editor window is connected to an instance that is in single-user mode.
141+
- The [!INCLUDE [ssDE](../../includes/ssde-md.md)] Query Editor window must be connected to an instance of the [!INCLUDE [ssdenoversion-md](../../includes/ssdenoversion-md.md)]. You can't run the debugger when the Query Editor window is connected to an instance that is in single-user mode.
160142

161143
- The server needs to communicate back to the client via RPC. The account under which SQL Server service is running must have authenticated permissions to the client.
162144

163-
## Next steps
145+
## Related content
164146

165147
- [Transact-SQL Debugger](./transact-sql-debugger.md)
166-
- [Run the Transact-SQL Debugger](./run-the-transact-sql-debugger.md)
148+
- [Run the Transact-SQL Debugger](./run-transact-sql-debugger.md)
167149
- [Step Through Transact-SQL Code](./step-through-transact-sql-code.md)
150+
- [Debug Stored Procedures](debug-stored-procedures.md)
168151
- [Transact-SQL Debugger Information](./transact-sql-debugger-information.md)
169-
- [Database Engine Query Editor (SQL Server Management Studio)](../f1-help/database-engine-query-editor-sql-server-management-studio.md)

0 commit comments

Comments
 (0)