Skip to content

Repo sync for protected CLA branch #8583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/code-quality/code-metrics-values.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: Calculate code metrics
ms.date: 11/02/2018
ms.date: 10/20/2022
description: Learn about cyclomatic complexity, class coupling, and other Visual Studio code metrics. See how metrics can track development progress and identify risks.
ms.custom: SEO-VS-2020
ms.topic: conceptual
f1_keywords:
- vs.codeanalysis.codemetrics.toolwindow
Expand Down Expand Up @@ -35,9 +34,9 @@ The following list shows the code metrics results that Visual Studio calculates:

- **Maintainability Index** - Calculates an index value between 0 and 100 that represents the relative ease of maintaining the code. A high value means better maintainability. Color coded ratings can be used to quickly identify trouble spots in your code. A green rating is between 20 and 100 and indicates that the code has good maintainability. A yellow rating is between 10 and 19 and indicates that the code is moderately maintainable. A red rating is a rating between 0 and 9 and indicates low maintainability. For more information, see [Maintainability index range and meaning](code-metrics-maintainability-index-range-and-meaning.md).

- **Cyclomatic Complexity** - Measures the structural complexity of the code. It is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable. For more information, see the [Uncyclopedia entry for cyclomatic complexity](https://wikipedia.org/wiki/Cyclomatic_complexity).
- **Cyclomatic Complexity** - Measures the structural complexity of the code. It is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable. For more information, see [Cyclomatic complexity](code-metrics-cyclomatic-complexity.md).

- **Depth of Inheritance** - Indicates the number of different classes that inherit from one another, all the way back to the base class. Depth of Inheritance is similar to class coupling in that a change in a base class can affect any of its inherited classes. The higher this number, the deeper the inheritance and the higher the potential for base class modifications to result in a breaking change. For Depth of Inheritance, a low value is good and a high value is bad.
- **Depth of Inheritance** - Indicates the number of different classes that inherit from one another, all the way back to the base class. Depth of Inheritance is similar to class coupling in that a change in a base class can affect any of its inherited classes. The higher this number, the deeper the inheritance and the higher the potential for base class modifications to result in a breaking change. For Depth of Inheritance, a low value is good and a high value is bad. For more information, see [Depth of inheritance](code-metrics-depth-of-inheritance.md).

- **Class Coupling** - Measures the coupling to unique classes through parameters, local variables, return types, method calls, generic or template instantiations, base classes, interface implementations, fields defined on external types, and attribute decoration. Good software design dictates that types and methods should have high cohesion and low coupling. High coupling indicates a design that is difficult to reuse and maintain because of its many interdependencies on other types. For more information, see [Class coupling](code-metrics-class-coupling.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ ms.workload:
# Configure Firewall for Remote Debugging Dialog Box

[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
This dialog box appears when the Windows Firewall blocks the debugger from receiving information over the network. To continue remote debugging, you must open a hole in the firewall so the debugger can receive information.
This dialog box appears when the Windows Firewall blocks the debugger from receiving information over the network. To continue remote debugging, you must open a port in the firewall so the debugger can receive information.

> [!CAUTION]
> Opening a hole in the Firewall may expose your machine to security threats that the Firewall is designed to block. Opening a hole for remote debugging unblocks ports 4020 and 4021 in Visual Studio 2015. In other versions of Visual Studio, other port numbers are used. For more information, see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md). In addition, it allows the debugger to open additional ports. For more information, see [Configure the Windows Firewall for Remote Debugging](../debugger/configure-the-windows-firewall-for-remote-debugging.md).
> Opening a port in the Firewall may expose your machine to security threats that the Firewall is designed to block. Opening a port for remote debugging unblocks ports 4020 and 4021 in Visual Studio 2015. In other versions of Visual Studio, other port numbers are used. For more information, see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md). In addition, it allows the debugger to open additional ports. For more information, see [Configure the Windows Firewall for Remote Debugging](../debugger/configure-the-windows-firewall-for-remote-debugging.md).

## UIElement List
**Cancel remote debugging**
Expand Down
2 changes: 1 addition & 1 deletion docs/debugger/debug-live-azure-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ If it's difficult to recreate a particular state in your app, consider using a c

#### To create a conditional snappoint

1. Right-click a snappoint icon (the hollow ball) and choose **Settings**.
1. Right-click a snappoint icon (the hollow sphere) and choose **Settings**.

![Choose Settings](../debugger/media/snapshot-snappoint-settings.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/debugger/debug-live-azure-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ If it's difficult to recreate a particular state in your app, consider using a c

#### To create a conditional snappoint

1. Right-click a snappoint icon (the hollow ball) and choose **Settings**.
1. Right-click a snappoint icon (the hollow sphere) and choose **Settings**.

![Choose Settings](../debugger/media/snapshot-snappoint-settings.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ In this tutorial, you:

![Screenshot that shows setting a snappoint in the code editor.](../debugger/media/time-travel-debugging-set-snappoint-settings.png)

1. Right-click the snappoint hollow ball icon and choose **Actions** to show the **Snapshot Settings** window.
1. Right-click the snappoint hollow sphere icon and choose **Actions** to show the **Snapshot Settings** window.

![Screenshot that shows the Snapshot Settings window.](../debugger/media/time-travel-debugging-set-snappoint-new.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/debugger/debug-live-azure-virtual-machines.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ If it's difficult to recreate a particular state in your app, consider using a c

#### To create a conditional snappoint

1. Right-click a snappoint icon (the hollow ball) and choose **Settings**.
1. Right-click a snappoint icon (the hollow sphere) and choose **Settings**.

![Choose Settings](../debugger/media/snapshot-snappoint-settings.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/debugger/debugger-tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ If it is difficult or time-consuming to recreate a particular state in your app,

#### To create a conditional breakpoint

1. Right-click a breakpoint icon (the red ball) and choose **Conditions**.
1. Right-click a breakpoint icon (the red sphere) and choose **Conditions**.

2. In the **Breakpoint Settings** window, type an expression.

Expand Down
25 changes: 25 additions & 0 deletions docs/debugger/includes/prerequisites-dotnet-linux-ssh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Prerequisites for .NET Core on Linux and SSH
description: Prerequisites for debugging .NET Core on Linux and SSH by attaching to a process
services: ""
author: mikejo5000
ms.service: ""
ms.topic: include
ms.date: 10/19/2022
ms.author: mikejo
ms.custom: include file
---

- On the Visual Studio computer, you need to install either the **ASP.NET and web development** workload or the **.NET Core cross-platform development** workload.

- On the Linux server, you need to install SSH server, unzip and install with either curl or wget. For example, on Ubuntu you can do that by running:

``` cmd
sudo apt-get install openssh-server unzip curl
```

SFTP must be enabled as well as SSH. Most SSH distributions install and enable SFTP by default, but that is not always the case.

- On the Linux server, [install the .NET runtime on Linux](/dotnet/core/install/linux), and find the page matching your Linux distribution (such as Ubuntu). The .NET SDK is not required.

- For comprehensive ASP.NET Core instructions, see [Host ASP.NET Core on Linux with Nginx](/aspnet/core/host-and-deploy/linux-nginx) and [Host ASP.NET Core on Linux with Apache](/aspnet/core/host-and-deploy/linux-apache).
33 changes: 33 additions & 0 deletions docs/debugger/remote-debugging-aks-on-linux-with-ssh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "Remote debug AKS on Linux using SSH"
description: Remote debug ASP.NET Core running in Azure Kubernetes Service (AKS) on Linux using Secure Shell (SSH) by attaching to a process. Prepare your app for debugging. Build and deploy the app. Attach the debugger.
ms.date: "10/19/2022"
ms.topic: "conceptual"
helpviewer_keywords:
- "remote debugging, linux"
author: "mikejo5000"
ms.author: "mikejo"
manager: jmartens
ms.technology: vs-ide-debug
ms.workload:
- "multiple"
---
# Remote debug .NET Core running in AKS on Linux using SSH by attaching to a process

[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]

Starting in Visual Studio 2017, you can attach to an ASP.NET Core process running in Azure Kubernetes Service (AKS) on a remote Linux deployment over Secure Shell (SSH).

## Prerequisites

[!INCLUDE [prerequisites-dotnet-linux-ssh](../debugger/includes/prerequisites-dotnet-linux-ssh.md)]

## Prepare to debug

1. Expose the AKS pod to the SSH port using an SSH key pair.

>[!NOTE]
> Depending on your security configuration, health probes may detect an unhealthy service and tear down the pod.

2. To debug, follow instructions described in [Debug .NET Core on Linux using SSH by attaching to a process](../debugger/remote-debugging-dotnet-core-linux-with-ssh.md).

16 changes: 2 additions & 14 deletions docs/debugger/remote-debugging-dotnet-core-linux-with-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,11 @@ ms.workload:

[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]

Starting in Visual Studio 2017, you can attach to .NET Core processes running on a local or remote Linux deployment over SSH. This article describes how to set up debugging and how to debug. For debugging scenarios using Docker containers, see [Attach to a process running on a Docker container](../debugger/attach-to-process-running-in-docker-container.md) and the [container tools](../containers/edit-and-refresh.md) articles instead. To debug Linux on WSL 2 from Visual Studio (no attach to process), see [Debug .NET Core Apps in WSL 2 with Visual Studio](../debugger/debug-dotnet-core-in-wsl-2.md).
Starting in Visual Studio 2017, you can attach to .NET Core processes running on a local or remote Linux deployment over Secure Shell (SSH). This article describes how to set up debugging and how to debug. For debugging scenarios using Docker containers, see [Attach to a process running on a Docker container](../debugger/attach-to-process-running-in-docker-container.md) and the [container tools](../containers/edit-and-refresh.md) articles instead. To debug Linux on WSL 2 from Visual Studio (no attach to process), see [Debug .NET Core Apps in WSL 2 with Visual Studio](../debugger/debug-dotnet-core-in-wsl-2.md).

## Prerequisites

- On the Visual Studio computer, you need to install either the **ASP.NET and web development** workload or the **.NET Core cross-platform development** workload.

- On the Linux server, you need to install SSH server, unzip and install with either curl or wget. For example, on Ubuntu you can do that by running:

``` cmd
sudo apt-get install openssh-server unzip curl
```

SFTP must be enabled as well as SSH. Most SSH distributions install and enable SFTP by default, but that is not always the case.

- On the Linux server, [install the .NET runtime on Linux](/dotnet/core/install/linux), and find the page matching your Linux distribution (such as Ubuntu). The .NET SDK is not required.

- For comprehensive ASP.NET Core instructions, see [Host ASP.NET Core on Linux with Nginx](/aspnet/core/host-and-deploy/linux-nginx) and [Host ASP.NET Core on Linux with Apache](/aspnet/core/host-and-deploy/linux-apache).
[!INCLUDE [prerequisites-dotnet-linux-ssh](../debugger/includes/prerequisites-dotnet-linux-ssh.md)]

## Prepare your application for debugging

Expand Down
2 changes: 2 additions & 0 deletions docs/debugger/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@
href: debug-dotnet-core-in-wsl-2.md
- name: Debug .NET Core on Linux using SSH
href: remote-debugging-dotnet-core-linux-with-ssh.md
- name: Remote debug .NET Core running in AKS on Linux using SSH
href: remote-debugging-aks-on-linux-with-ssh.md
- name: Debug with Container Tools >>
href: ../containers/edit-and-refresh.md
- name: Application types
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/tutorial-import-publish-settings-iis.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Publish to IIS by importing publish settings"
description: "Create and import a publishing profile to deploy an application from Visual Studio to IIS"
ms.date: 10/22/2021
ms.date: 10/20/2022
ms.topic: tutorial
helpviewer_keywords:
- "deployment, publish settings"
Expand Down Expand Up @@ -30,7 +30,7 @@ These steps apply to ASP.NET and ASP.NET Core web applications.
* Install the latest updates in Visual Studio by selecting **Help** > **Check for Updates**.
* Add the workload by selecting **Tools** > **Get Tools and Features**.

* On your server, you must be running Windows Server 2012, Windows Server 2016, or Windows Server 2019, and you must have the [IIS Web Server role](/iis/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#solution) correctly installed (required to generate the publish settings file (*\*.publishsettings*)). Either ASP.NET 4.5 or ASP.NET Core must also be installed on the server.
* On your server, you must be running Windows Server 2012 or greater, and you must have the [IIS Web Server role](/iis/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#solution) correctly installed (required to generate the publish settings file (*\*.publishsettings*)). Either ASP.NET 4.5 or ASP.NET Core must also be installed on the server. The steps in this tutorial were tested in Windows Server 2022.

* To set up ASP.NET Core, see [Host ASP.NET Core on Windows with IIS](/aspnet/core/publishing/iis?tabs=aspnetcore2x#iis-configuration). For ASP.NET Core, make sure you configure the Application Pool to use **No Managed Code**, as described in the article.

Expand Down
18 changes: 15 additions & 3 deletions docs/designers/disable-dpi-awareness.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Disable DPI-awareness for scaling in forms
description: Fix scaling issues with Windows Forms Designer on HDPI monitors.
ms.date: 04/10/2022
ms.date: 10/20/2022
author: TerryGLee
ms.author: tglee
manager: jmartens
Expand Down Expand Up @@ -51,14 +51,26 @@ There are three options to resolve the display problem:

### Restart Visual Studio as a DPI-unaware process

The preferred solution to this issue is to restart Visual Studio as a DPI-unaware process. Do so by selecting the option on the yellow informational bar.
The preferred solution to this issue is to restart Visual Studio as a DPI-unaware process. Do so by selecting the option on the yellow informational bar.

When Visual Studio runs as a DPI-unaware process, the designer layout issues are resolved, but fonts may appear blurry and you may see issues in other designers such as the **XAML Designer**.. Visual Studio displays a different yellow informational message when it runs as a DPI-unaware process that says **Visual Studio is running as a DPI-unaware process. WPF and XAML designers might not display correctly.** The informational bar also provides an option to **Restart Visual Studio as a DPI-aware process**.

::: moniker range="<=vs-2019"

> [!NOTE]
> - If you had undocked tool windows in Visual Studio when you selected the option to restart as a DPI-unaware process, the position of those tool windows may change.
> - If you have undocked tool windows in Visual Studio when you select the option to restart as a DPI-unaware process, the position of the tool windows might change.
> - If you use the default Visual Basic profile, or if you have the **Save new projects when created** option deselected in **Tools** > **Options** > **Projects and Solutions**, Visual Studio cannot reopen your project when it restarts as a DPI-unaware process. However, you can open the project by selecting it under **File** > **Recent Projects and Solutions**.

::: moniker-end

::: moniker range=">=vs-2022"

> [!NOTE]
> - If you have undocked tool windows in Visual Studio when you select the option to restart as a DPI-unaware process, the position of the tool windows might change.
> - If you use the default Visual Basic profile, Visual Studio cannot reopen your project when it restarts as a DPI-unaware process. However, you can open the project by selecting it under **File** > **Recent Projects and Solutions**.

::: moniker-end

It's important to restart Visual Studio as a DPI-aware process when you're finished working in the **Windows Forms Designer**. If you close and reopen Visual Studio when it's running in DPI-unaware mode, it becomes DPI-aware again. You can also select the **Restart Visual Studio as a DPI-aware process** option in the informational bar.

### Add a registry entry
Expand Down
6 changes: 3 additions & 3 deletions docs/version-control/git-create-branch.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Create a branch
description: Create a branch for source control in Visual Studio with Git.
ms.date: 03/03/2022
ms.date: 10/20/2022
ms.topic: how-to
author: TerryGLee
ms.author: tglee
Expand All @@ -27,8 +27,8 @@ Here's how.
1. In the **Create a new branch** dialog box, enter a branch name.

> [!TIP]
> For branch naming details, see [Special characters in branch and tag names](https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names).
> For branch naming details, see [Special characters in branch and tag names](https://docs.github.com/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names).

:::image type="content" source="media/vs-2022/git-create-new-branch-dialog.png" alt-text="Screenshot of the Create a New Branch dialog box.":::

1. In the **Based on** section, use the drop-down list to choose whether you want to base your new branch off an existing local branch or a remote branch.
Expand Down
Loading