Skip to content

Commit 27ebae2

Browse files
authored
Merge pull request #7045 from MicrosoftDocs/master637671711990657730
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 36e272f + 01a5d1e commit 27ebae2

16 files changed

+153
-29
lines changed

docs/debugger/attach-to-running-processes-with-the-visual-studio-debugger.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Attach to running processes with the debugger"
33
description: Discover how to attach the Visual Studio debugger to a running process on a local or remote computer.
44
ms.custom: "SEO-VS-2020"
5-
ms.date: "06/28/2021"
5+
ms.date: "09/10/2021"
66
ms.topic: "conceptual"
77
f1_keywords:
88
- "vs.debug.processes.attach"
@@ -102,7 +102,13 @@ For more complete instructions for debugging ASP.NET applications that have been
102102

103103
Verify that Visual Studio adds the required port to the computer name, which appears in the format: **\<remote computer name>:port**
104104

105-
::: moniker range=">= vs-2019"
105+
::: moniker range=">= vs-2022"
106+
107+
> [!NOTE]
108+
> If you can't connect using the remote computer name, try using the IP and port address (for example, `123.45.678.9:4022`). 4026 is the default port for the Visual Studio 2022 x64 remote debugger. For other remote debugger port assignments, see [Remote debugger port assignments](remote-debugger-port-assignments.md).
109+
110+
::: moniker-end
111+
::: moniker range="vs-2019"
106112

107113
> [!NOTE]
108114
> If you can't connect using the remote computer name, try using the IP and port address (for example, `123.45.678.9:4022`). 4024 is the default port for the Visual Studio 2019 x64 remote debugger. For other remote debugger port assignments, see [Remote debugger port assignments](remote-debugger-port-assignments.md).

docs/debugger/configure-the-windows-firewall-for-remote-debugging.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Configure Windows Firewall for remote debugging | Microsoft Docs
33
description: Configure Windows Firewall for remote debugging. Configure ports for remote debugging. Troubleshoot the remote debugging connection.
44
ms.custom: SEO-VS-2020
5-
ms.date: 10/31/2018
5+
ms.date: 09/10/2021
66
ms.topic: how-to
77
ms.assetid: 66e3230a-d195-4473-bbce-8ca198516014
88
author: mikejo5000
@@ -49,27 +49,35 @@ Visual Studio and the remote debugger try to open the correct ports during insta
4949

5050
For Windows Firewall, you can use PowerShell commands such as [New-NetFirewallRule](/powershell/module/netsecurity/new-netfirewallrule).
5151

52+
::: moniker range="vs-2022"
53+
The following example opens port 4026 for the remote debugger on the remote computer. The path you need to use may be different.
54+
55+
```ps
56+
New-NetFirewallRule -DisplayName "msvsmon" -Direction Inbound -Program "Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Remote Debugger\x86\msvsmon.exe" -LocalPort 4026 -Protocol TCP -Authentication Required -Action Allow
57+
```
58+
::: moniker-end
59+
::: moniker range="vs-2019"
5260
The following example opens port 4024 for the remote debugger on the remote computer. The path you need to use may be different.
5361

5462
```ps
5563
New-NetFirewallRule -DisplayName "msvsmon" -Direction Inbound -Program "Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Remote Debugger\x86\msvsmon.exe" -LocalPort 4024 -Protocol TCP -Authentication Required -Action Allow
5664
```
65+
::: moniker-end
5766

5867
### Ports on the remote computer that enable remote debugging
5968

6069
For remote debugging, the following ports must be open on the remote computer:
6170

62-
::: moniker range="vs-2017"
71+
::: moniker range="vs-2022"
6372

6473
|**Ports**|**Incoming/Outgoing**|**Protocol**|**Description**|
6574
|-|-|-|-|
66-
|4022|Incoming|TCP|For VS 2017. The port number increments by 2 for each Visual Studio version. For more information, see [Visual Studio remote debugger port assignments](../debugger/remote-debugger-port-assignments.md).|
67-
|4023|Incoming|TCP|For VS 2017. The port number increments by 2 for each Visual Studio version. This port is only used to remote debug a 32-bit process from a 64-bit version of the remote debugger. For more information, see [Visual Studio remote debugger port assignments](../debugger/remote-debugger-port-assignments.md).|
75+
|4026|Incoming|TCP|For VS 2022. The port number increments by 2 for each Visual Studio version. For more information, see [Visual Studio remote debugger port assignments](../debugger/remote-debugger-port-assignments.md).|
76+
|4027|Incoming|TCP|For VS 2022. The port number increments by 2 for each Visual Studio version. This port is only used to remote debug a 32-bit process from a 64-bit version of the remote debugger. For more information, see [Visual Studio remote debugger port assignments](../debugger/remote-debugger-port-assignments.md).|
6877
|3702|Outgoing|UDP|(Optional) Required for remote debugger discovery.|
6978

7079
::: moniker-end
71-
72-
::: moniker range=">= vs-2019"
80+
::: moniker range="vs-2019"
7381

7482
|**Ports**|**Incoming/Outgoing**|**Protocol**|**Description**|
7583
|-|-|-|-|
@@ -79,6 +87,18 @@ For remote debugging, the following ports must be open on the remote computer:
7987

8088
::: moniker-end
8189

90+
::: moniker range="vs-2017"
91+
92+
|**Ports**|**Incoming/Outgoing**|**Protocol**|**Description**|
93+
|-|-|-|-|
94+
|4022|Incoming|TCP|For VS 2017. The port number increments by 2 for each Visual Studio version. For more information, see [Visual Studio remote debugger port assignments](../debugger/remote-debugger-port-assignments.md).|
95+
|4023|Incoming|TCP|For VS 2017. The port number increments by 2 for each Visual Studio version. This port is only used to remote debug a 32-bit process from a 64-bit version of the remote debugger. For more information, see [Visual Studio remote debugger port assignments](../debugger/remote-debugger-port-assignments.md).|
96+
|3702|Outgoing|UDP|(Optional) Required for remote debugger discovery.|
97+
98+
::: moniker-end
99+
100+
101+
82102
If you select **Use Managed Compatibility Mode** under **Tools** > **Options** > **Debugging**, open these additional remote debugger ports. Debugger Managed Compatibility Mode enables a legacy, Visual Studio 2010 version of the debugger.
83103

84104
|**Ports**|**Incoming/Outgoing**|**Protocol**|**Description**|

docs/debugger/includes/remote-debugger-download.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
author: mikejo5000
66
ms.service: ""
77
ms.topic: include
8-
ms.date: 05/23/2018
8+
ms.date: 09/10/2021
99
ms.author: mikejo
1010
ms.custom: include file
1111
---
@@ -15,7 +15,19 @@ On the remote device or server that you want to debug on, rather than the Visual
1515
- Download the most recent remote tools for your version of Visual Studio. The latest remote tools version is compatible with earlier Visual Studio versions, but earlier remote tools versions aren't compatible with later Visual Studio versions. (For example, if you are using Visual Studio 2017, download the latest update of the remote tools for Visual Studio 2017. In this scenario, do not download the remote tools for Visual Studio 2019.)
1616
- Download the remote tools with the same architecture as the machine you're installing them on. For example, if you want to debug a 32-bit app on a remote computer running a 64-bit operating system, install the 64-bit remote tools.
1717

18-
::: moniker range=">=vs-2019"
18+
::: moniker range=">=vs-2022"
19+
20+
|Version|Link|Notes|
21+
|-|-|-|
22+
|Visual Studio 2022 Preview|[Remote tools for the Preview](https://visualstudio.microsoft.com/vs/preview/)|Compatible with all Visual Studio 2022 versions. Download the version matching your device operating system (x86, x64, or ARM64). On Windows Server, see [Unblock the file download](../../debugger/remote-debugging-unblock-file-download.md) for help downloading the remote tools.|
23+
|Visual Studio 2019|[Remote tools](https://visualstudio.microsoft.com/downloads#remote-tools-for-visual-studio-2019)|Compatible with all Visual Studio 2019 versions. Download the version matching your device operating system (x86, x64, or ARM64). On Windows Server, see [Unblock the file download](../../debugger/remote-debugging-unblock-file-download.md) for help downloading the remote tools.|
24+
|Visual Studio 2017|[Remote tools](https://my.visualstudio.com/Downloads?q=remote%20tools%20visual%20studio%202017)|Compatible with all Visual Studio 2017 versions. Download the version matching your device operating system (x86, x64, or ARM64). On Windows Server, see [Unblock the file download](../../debugger/remote-debugging-unblock-file-download.md) for help downloading the remote tools.|
25+
|Visual Studio 2015|[Remote tools](https://my.visualstudio.com/Downloads?q=remote%20tools%20visual%20studio%202015)|Remote tools for Visual Studio 2015 are available from My.VisualStudio.com. If prompted, join the free [Visual Studio Dev Essentials](https://visualstudio.microsoft.com/dev-essentials/) program, or sign in with your Visual Studio subscription ID. On Windows Server, see [Unblock the file download](../../debugger/remote-debugging-unblock-file-download.md) for help downloading the remote tools.|
26+
|Visual Studio 2013|[Remote tools](/previous-versions/visualstudio/visual-studio-2013/bt727f1t(v=vs.120)#installing-the-remote-tools)|Download page in Visual Studio 2013 documentation|
27+
|Visual Studio 2012|[Remote tools](/previous-versions/visualstudio/visual-studio-2012/bt727f1t(v=vs.110)#installing-the-remote-tools)|Download page in Visual Studio 2012 documentation|
28+
29+
::: moniker-end
30+
::: moniker range="vs-2019"
1931

2032
|Version|Link|Notes|
2133
|-|-|-|

docs/debugger/remote-debugger-port-assignments.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Remote Debugger Port Assignments | Microsoft Docs"
33
description: Understand Visual Studio remote debugger port assignments on 32-bit operating systems, 64-bit operating systems, and Azure. Learn about the discovery port.
44
ms.custom: SEO-VS-2020
5-
ms.date: "05/18/2018"
5+
ms.date: "09/10/2021"
66
ms.topic: "reference"
77
ms.assetid: 238bb4ec-bb00-4c2b-986e-18ac278f3959
88
author: "mikejo5000"
@@ -14,7 +14,10 @@ ms.workload:
1414
---
1515
# Remote Debugger Port Assignments
1616
The Visual Studio Remote Debugger can run as an application or as a background service. When it runs as an application, it uses a port that is assigned by default as follows:
17-
::: moniker range=">=vs-2019"
17+
::: moniker range=">=vs-2022"
18+
- Visual Studio 2022: 4026
19+
::: moniker-end
20+
::: moniker range="vs-2019"
1821
- Visual Studio 2019: 4024
1922
::: moniker-end
2023
- Visual Studio 2017: 4022
@@ -29,7 +32,10 @@ In other words, the number of the port assigned to the remote debugger is increm
2932

3033
## The Remote Debugger Port on 32-bit Operating Systems
3134

32-
::: moniker range=">=vs-2019"
35+
::: moniker range=">=vs-2022"
36+
TCP 4026 (in Visual Studio 2022) is the main port, and is required for all scenarios. You can configure this from either the command line or the remote debugger window.
37+
::: moniker-end
38+
::: moniker range="vs-2019"
3339
TCP 4024 (in Visual Studio 2019) is the main port, and is required for all scenarios. You can configure this from either the command line or the remote debugger window.
3440
::: moniker-end
3541
::: moniker range="vs-2017"
@@ -43,7 +49,10 @@ In other words, the number of the port assigned to the remote debugger is increm
4349
You can find all the remote debugger command line switches in the remote debugging help (press **F1** or click **Help > Usage** in the remote debugger window).
4450

4551
## The Remote Debugger Port on 64-bit Operating Systems
46-
::: moniker range=">=vs-2019"
52+
::: moniker range=">=vs-2022"
53+
When the 64-bit version of the remote debugger is started, it uses the main port (4026) by default. If you debug a 32-bit process, the 64-bit version of the remote debugger starts a 32-bit version of the remote debugger on port 4027 (the main port number incremented by 1). If you run the 32-bit remote debugger, it uses 4026, and 4027 is not used.
54+
::: moniker-end
55+
::: moniker range="vs-2019"
4756
When the 64-bit version of the remote debugger is started, it uses the main port (4024) by default. If you debug a 32-bit process, the 64-bit version of the remote debugger starts a 32-bit version of the remote debugger on port 4025 (the main port number incremented by 1). If you run the 32-bit remote debugger, it uses 4024, and 4025 is not used.
4857
::: moniker-end
4958
::: moniker range="vs-2017"

docs/debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ For information on running the remote debugger as a service, see [Run the remote
209209

210210
Verify that Visual Studio adds the required port to the computer name, which appears in the format: **\<remote computer name>:port**
211211

212-
::: moniker range=">=vs-2019"
212+
::: moniker range=">=vs-2022"
213+
On Visual Studio 2022, you should see **\<remote computer name>:4026**
214+
::: moniker-end
215+
::: moniker range="vs-2019"
213216
On Visual Studio 2019, you should see **\<remote computer name>:4024**
214217
::: moniker-end
215218
::: moniker range="vs-2017"
@@ -263,6 +266,9 @@ In most setups, required ports are opened by the installation of ASP.NET and the
263266
Required ports:
264267

265268
* 80 - Required for IIS
269+
::: moniker range=">=vs-2022"
270+
* 4026 - Required for remote debugging from Visual Studio 2022 (see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md) for more information).
271+
::: moniker-end
266272
::: moniker range=">=vs-2019"
267273
* 4024 - Required for remote debugging from Visual Studio 2019 (see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md) for more information).
268274
::: moniker-end

docs/debugger/remote-debugging-aspnet-on-a-remote-iis-computer.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ For information on running the remote debugger as a service, see [Run the remote
195195

196196
Verify that Visual Studio adds the required port to the computer name, which appears in the format: **\<remote computer name>:port**
197197

198-
::: moniker range=">=vs-2019"
198+
::: moniker range=">=vs-2022"
199+
On Visual Studio 2022, you should see **\<remote computer name>:4026**
200+
::: moniker-end
201+
::: moniker range="vs-2019"
199202
On Visual Studio 2019, you should see **\<remote computer name>:4024**
200203
::: moniker-end
201204
::: moniker range="vs-2017"
@@ -257,7 +260,10 @@ In most setups, required ports are opened by the installation of ASP.NET and the
257260
Required ports:
258261

259262
* 80 - Required for IIS (HTTP)
260-
::: moniker range=">=vs-2019"
263+
::: moniker range=">=vs-2022"
264+
* 4026 - Required for remote debugging from Visual Studio 2022 (see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md) for more information).
265+
::: moniker-end
266+
::: moniker range="vs-2019"
261267
* 4024 - Required for remote debugging from Visual Studio 2019 (see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md) for more information).
262268
::: moniker-end
263269
::: moniker range="vs-2017"

docs/debugger/remote-debugging-azure.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ This article includes steps on setting up a basic configuration of IIS on Window
127127

128128
* Before you begin, follow all the steps described in [Create a Windows Virtual Machine](/azure/virtual-machines/windows/quick-create-portal), which includes steps to install the IIS web server.
129129

130-
* Make sure you open port 80 in the Azure [Network security group](/azure/virtual-machines/windows/nsg-quickstart-portal). When you verify that port 80 is open, also open the [correct port](#bkmk_openports) for the remote debugger (4024 or 4022). That way, you won't have to open it later. If you're using Web Deploy, also open port 8172.
130+
* Make sure you open port 80 in the Azure [Network security group](/azure/virtual-machines/windows/nsg-quickstart-portal). When you verify that port 80 is open, also open the [correct port](#bkmk_openports) for the remote debugger (4026, 4024, or 4022). That way, you won't have to open it later. If you're using Web Deploy, also open port 8172.
131131

132132
### Update browser security settings on Windows Server
133133

@@ -246,7 +246,10 @@ Download the version of the remote tools that matches your version of Visual Stu
246246

247247
Verify that Visual Studio adds the required port to the computer name, which appears in the format: **\<remote computer name>:port**
248248

249-
::: moniker range=">=vs-2019"
249+
::: moniker range=">=vs-2022"
250+
On Visual Studio 2022, you should see **\<remote computer name>:4026**
251+
::: moniker-end
252+
::: moniker range="vs-2019"
250253
On Visual Studio 2019, you should see **\<remote computer name>:4024**
251254
::: moniker-end
252255
::: moniker range="vs-2017"
@@ -306,7 +309,10 @@ On an Azure VM, you must open ports through the [Network security group](/azure/
306309
Required ports:
307310

308311
* 80 - Required for IIS
309-
::: moniker range=">=vs-2019"
312+
::: moniker range=">=vs-2022"
313+
* 4026 - Required for remote debugging from Visual Studio 2022 (see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md) for more information).
314+
::: moniker-end
315+
::: moniker range="vs-2019"
310316
* 4024 - Required for remote debugging from Visual Studio 2019 (see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md) for more information).
311317
::: moniker-end
312318
::: moniker range="vs-2017"

docs/debugger/remote-debugging-csharp.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ The debugger cannot deploy Visual C# or Visual Basic desktop applications to a r
6868
6. Choose **Use remote machine**, and type **yourmachinename:port** in the text box. (The port number is shown in the remote debugger window. The port number increments 2 in each version of Visual Studio).
6969

7070
In this example, use:
71-
::: moniker range=">=vs-2019"
71+
::: moniker range="vs-2022"
72+
**MJO-DL:4026** on Visual Studio 2019
73+
::: moniker-end
74+
::: moniker range="vs-2019"
7275
**MJO-DL:4024** on Visual Studio 2019
7376
::: moniker-end
7477
::: moniker range="vs-2017"
@@ -86,7 +89,7 @@ The debugger cannot deploy Visual C# or Visual Basic desktop applications to a r
8689
> [!CAUTION]
8790
> Do not make changes to the code or rebuild (or you must repeat this step). The executable you copied to the remote machine must exactly match your local source and symbols.
8891
89-
You can copy the project manually, use XCopy, Robocopy, Powershell, or other options.
92+
You can copy the project manually, use XCopy, Robocopy, PowerShell, or other options.
9093

9194
11. Make sure the remote debugger is running on the target machine (If it's not, search for **Remote Debugger** in the **Start** menu). The remote debugger window looks like this.
9295

@@ -116,4 +119,4 @@ The debugger cannot deploy Visual C# or Visual Basic desktop applications to a r
116119
- [Configure the Windows Firewall for Remote Debugging](../debugger/configure-the-windows-firewall-for-remote-debugging.md)
117120
- [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md)
118121
- [Remote Debugging ASP.NET on a Remote IIS Computer](../debugger/remote-debugging-aspnet-on-a-remote-iis-computer.md)
119-
- [Remote Debugging Errors and Troubleshooting](../debugger/remote-debugging-errors-and-troubleshooting.md)
122+
- [Remote Debugging Errors and Troubleshooting](../debugger/remote-debugging-errors-and-troubleshooting.md)

docs/debugger/remote-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Remote debugging | Microsoft Docs"
33
description: Debug a Visual Studio application that has been deployed on a different computer by using the Visual Studio remote debugger.
44
ms.custom: ['remotedebugging', 'seodec18', 'SEO-VS-2020']
5-
ms.date: "7/26/2021"
5+
ms.date: "09/10/2021"
66
ms.topic: "conceptual"
77
f1_keywords:
88
- "vs.debug.remote.overview"

docs/debugger/watch-and-quickwatch-windows.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
title: Set a watch on variables | Microsoft Docs
33
description: While you debug, see variables and expressions in Watch and QuickWatch. Watch can display several variables, QuickWatch only one, and only while in break.
44
ms.custom: "SEO-VS-2020"
5-
ms.date: 10/11/2018
5+
ms.date: 09/10/2021
66
ms.topic: how-to
7+
f1_keywords:
8+
- "vs.debug.quickwatch"
79
helpviewer_keywords:
810
- debugging [Visual Studio], Watch window
911
- expressions [debugger], evaluating
@@ -22,7 +24,7 @@ ms.workload:
2224

2325
While you're debugging, you can use **Watch** windows and **QuickWatch** to watch variables and expressions. The windows are only available during a debugging session.
2426

25-
**Watch** windows can display several variables at a time while debugging. The **QuickWatch** dialog displays a single variable at a time, and must be closed before debugging can continue.
27+
**Watch** windows can display several variables at a time while debugging. The **QuickWatch** dialog displays a single variable at a time, and must be closed before debugging can continue. For more information on using QuickWatch, see [Observe a single variable or expression with QuickWatch](#observe-a-single-variable-or-expression-with-quickwatch).
2628

2729
> [!NOTE]
2830
> If this is the first time that you've tried to debug code, you may want to read [Debugging for absolute beginners](../debugger/debugging-absolute-beginners.md) and [Debugging techniques and tools](../debugger/write-better-code-with-visual-studio.md) before going through this article.

0 commit comments

Comments
 (0)