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
Copy file name to clipboardExpand all lines: docs/debugger/configure-the-windows-firewall-for-remote-debugging.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,11 +94,11 @@ If you select **Use Managed Compatibility Mode** under **Tools** > **Options** >
94
94
95
95
::: moniker-end
96
96
97
-
If your domain policy requires network communication to be performed through Internet Protocol Security (IPSec), you must open additional ports on both the Visual Studio and remote computers. To debug on a remote Internet Information Services (IIS) web server, open port 80 on the remote computer.
97
+
If your domain policy requires network communication to be performed through Internet Protocol Security (IPsec), you must open additional ports on both the Visual Studio and remote computers. To debug on a remote Internet Information Services (IIS) web server, open port 80 on the remote computer.
|500, 4500|Outgoing|UDP|Required if your domain policy requires network communication to be performed through IPSec.|
101
+
|500, 4500|Outgoing|UDP|Required if your domain policy requires network communication to be performed through IPsec.|
102
102
|80|Outgoing|TCP|Required for web server debugging.|
103
103
104
104
To allow specific apps through the Windows Firewall, see [Configure remote debugging through Windows Firewall](#allow-the-remote-debugger-through-windows-firewall).
Copy file name to clipboardExpand all lines: docs/debugger/how-to-enable-and-disable-edit-and-continue.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Configure Edit and Continue
3
3
description: Learn how to enable, disable, and configure Edit and Continue, in Visual Studio Options at design time. Edit and Continue works only in debug builds.
4
-
ms.date: 02/22/2023
4
+
ms.date: 01/24/2025
5
5
ms.topic: how-to
6
6
dev_langs:
7
7
- CSharp
@@ -56,13 +56,13 @@ Or, open **Tools** > **Options** > **Debugging** > **.NET/C++ Hot Reload**.
56
56
57
57
The settings for Hot Reload include:
58
58
59
-
***Enable Hot Reload and Edit and Continue when debugging**. Enables Hot Reload when starting with the debugger attached (F5).
59
+
-**Enable Hot Reload**. Enables Hot Reload when starting with the debugger attached (F5).
60
60
61
-
***Enable Hot Reload when starting without debugging**. Enables Hot Reload when starting without the debugger attached (Ctrl+F5).
61
+
-**Enable Hot Reload when starting without debugging**. Enables Hot Reload when starting without the debugger attached (Ctrl+F5).
62
62
63
-
***Apply Hot Reload on File Save**. Applies code changes when you save the file.
63
+
-**Apply Hot Reload on File Save**. Applies code changes when you save the file.
64
64
65
-
***Logging Verbosity**. Filters amount of information displayed in the Hot Reload Output window.
65
+
-**Logging Verbosity**. Filters amount of information displayed in the Hot Reload Output window.
66
66
67
67

You can debug ASP.NET and ASP.NET Core apps in Visual Studio. The process differs between ASP.NET and ASP.NET Core, and whether you run it on IIS Express or a local IIS server.
23
23
24
24
>[!NOTE]
25
-
>The following steps and settings apply only to debugging apps on a local server. Debugging apps on a remote IIS server uses **Attach to Process**, and ignores these settings. For more information and instructions for remote debugging ASP.NET apps on IIS, see [Remote debug ASP.NET on an IIS computer](../debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer.md) or[Remote debug ASP.NET Core on a remote IIS computer](../debugger/remote-debugging-aspnet-on-a-remote-iis-computer.md).
25
+
>The following steps and settings apply only to debugging apps on a local server. Debugging apps on a remote IIS server uses **Attach to Process**, and ignores these settings. For more information and instructions for remote debugging ASP.NET and ASP.NET Core, see [Remote debug ASP.NET Core on a remote IIS computer](../debugger/remote-debugging-aspnet-on-a-remote-iis-computer.md), and[Remote debug Azure App Service](../debugger/remote-debugging-azure-app-service.md).
26
26
27
27
::: moniker range=">=vs-2022"
28
28
The built-in Kestrel and IIS Express servers are included with Visual Studio. Kestrel is the default debug server for ASP.NET Core projects, and is preconfigured. IIS Express is the default debug server for ASP.NET.
@@ -43,7 +43,7 @@ You can also debug an ASP.NET or ASP.NET Core app on a local IIS server (version
43
43
44
44
- Run Visual Studio as an administrator.
45
45
- Install and correctly configure IIS with the appropriate version(s) of ASP.NET and/or ASP.NET Core. For more information on using IIS with ASP.NET Core, see [Host ASP.NET Core on Windows with IIS](/aspnet/core/host-and-deploy/iis/index). For ASP.NET, see [Install IIS and ASP.NET Modules](/iis/application-frameworks/scenario-build-an-aspnet-website-on-iis/configuring-step-1-install-iis-and-asp-net-modules).
46
-
- Make sure the app runs on IIS without errors.
46
+
- Make sure the app runs on IIS and opens in the browser.
Copy file name to clipboardExpand all lines: docs/debugger/remote-debugging.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,13 +26,13 @@ For in-depth instructions on remote debugging, see these topics.
26
26
27
27
|Scenario|Link|
28
28
|-|-|
29
-
|Azure App Service|[Remote debug ASP.NET Core on Azure](../debugger/remote-debugging-azure-app-service.md) or, for Visual Studio Enterprise, the [Snapshot Debugger](../debugger/debug-live-azure-applications.md)|
30
-
|Azure VM|[Remote debug ASP.NET on an Azure VM](../debugger/remote-debugging-azure.md)|
31
-
|ASP.NET|[Remote debug ASP.NET Core](../debugger/remote-debugging-aspnet-on-a-remote-iis-computer.md) or [Remote Debug ASP.NET](../debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer.md)|
32
29
|C# or Visual Basic|[Remote debug a C# or Visual Basic project](../debugger/remote-debugging-csharp.md)|
33
30
|C++|[Remote debug a C++ project](../debugger/remote-debugging-cpp.md)|
34
-
|Docker|[Attach to a process running in a Docker container](../debugger/attach-to-process-running-in-docker-container.md)|
31
+
|Azure App Service|[Remote debug ASP.NET Core on Azure](../debugger/remote-debugging-azure-app-service.md) or, for Visual Studio Enterprise, the [Snapshot Debugger](../debugger/debug-live-azure-applications.md)|
32
+
|ASP.NET|[Remote debug ASP.NET Core](../debugger/remote-debugging-aspnet-on-a-remote-iis-computer.md) or [Remote Debug ASP.NET](../debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer.md)|
33
+
|Azure VM|[Remote debug ASP.NET on an Azure VM](../debugger/remote-debugging-azure.md)|
35
34
|Linux|[Debug .NET Core on Linux using SSH by attaching to a process](../debugger/remote-debugging-dotnet-core-linux-with-ssh.md)|
35
+
|Docker|[Attach to a process running in a Docker container](../debugger/attach-to-process-running-in-docker-container.md)|
36
36
|Universal Windows Apps (UWP)|[Run UWP apps on a remote machine](../debugger/run-windows-store-apps-on-a-remote-machine.md) or [Debug an installed app package](../debugger/debug-installed-app-package.md)|
37
37
38
38
If you just want to download and install the remote debugger and don't need any additional instructions for your scenario, follow the steps in this article.
@@ -88,13 +88,21 @@ You can change some aspects of the configuration of the remote debugger after yo
88
88
89
89
Alternatively, you can start the remote debugger from the command line with the **/allow \<username>** parameter: **msvsmon /allow \<username@computer>**.
90
90
91
-
- If you need to change the Authentication mode or the port number, or specify a timeout value for the remote tools: choose **Tools > Options**.
91
+
- If you need to change the Authentication mode or the port number, or specify a time-out value for the remote tools: choose **Tools > Options**.
92
92
93
93
For a listing of the port numbers used by default, see [Remote Debugger Port Assignments](../debugger/remote-debugger-port-assignments.md).
94
94
95
95
> [!WARNING]
96
96
> You can choose to run the remote tools in No Authentication mode, but this mode is strongly discouraged. There's no network security when you run in this mode. Choose the No Authentication mode only if you're sure that the network isn't at risk from malicious or hostile traffic.
97
97
98
+
## Configure Visual Studio for remote debugging
99
+
100
+
For detailed instructions to connect to the app from Visual Studio, use the links related to your specific scenario at the beginning of this article.
101
+
102
+
Some scenarios require the use of Attach to Process to connect to a remote app that is already started. However, for .NET Core, .NET 5+, .NET Framework, and C++ apps, you can start the remote app from Visual Studio by configuring project properties and starting the debugger. For more information, see [Remote debug a C# or Visual Basic project](../debugger/remote-debugging-csharp.md) or [Remote debug a C++ project](../debugger/remote-debugging-cpp.md).
103
+
104
+
You can also remote debug an executable that is not part of a Visual Studio project, although the supported debugging features depend on configuration such as the availability of symbols. For more information, see [Debug an app that isn't part of a Visual Studio solution](../debugger/how-to-debug-an-executable-not-part-of-a-visual-studio-solution.md).
105
+
98
106
## <aname="bkmk_configureService"></a> (Optional) Configure the remote debugger as a service
99
107
100
108
For debugging in ASP.NET and other server environments, you must either run the remote debugger as an Administrator or, if you want it always running, run the remote debugger as a service.
Copy file name to clipboardExpand all lines: docs/ide/javascript-intellisense.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,13 +100,13 @@ function Foo(param1) {
100
100
}
101
101
```
102
102
103
-
See the JsDoc information in [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc) for the JsDoc annotations currently supported.
103
+
See the JSDoc information in [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc) for the JSDoc annotations currently supported.
104
104
105
105
## IntelliSense based on TypeScript declaration files
106
106
107
-
Because JavaScript and TypeScript are based on the same language service, they are able to interact in a rich way. For example, JavaScript IntelliSense can be provided for values declared in a *.d.ts* file (see [TypeScript documentation](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)), and types such as interfaces and classes declared in TypeScript are available for use as types in JsDoc comments.
107
+
Because JavaScript and TypeScript are based on the same language service, they are able to interact in a rich way. For example, JavaScript IntelliSense can be provided for values declared in a *.d.ts* file (see [TypeScript documentation](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)), and types such as interfaces and classes declared in TypeScript are available for use as types in JSDoc comments.
108
108
109
-
Below, we show a simple example of a TypeScript definition file providing such type information (via an interface) to a JavaScript file in the same project (using a `JsDoc` tag).
109
+
Below, we show a simple example of a TypeScript definition file providing such type information (via an interface) to a JavaScript file in the same project (using a `JSDoc` tag).
Copy file name to clipboardExpand all lines: docs/msbuild/tutorial-rest-api-client-msbuild.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ The complete code is in the *PetReaderExecTaskExample* folder; you can download
51
51
52
52
1. In the `PetShopRestClient` project, add a folder (named `PetShopRestClient`) for the code generation and delete the *Class1.cs* that was automatically generated.
53
53
54
-
1. Create a text file named *petshop-openapi-spec.json* at the root of the project. Copy the OpenApi spec from [here](https://petstore.swagger.io/v2/swagger.json) and save it in the file. It's best to copy a snapshot of the spec instead of reading it online during the build. You always want a consistently reproducible build that depends only on the input. Consuming the API directly could transform a build which works today to a build which fails tomorrow from the same source. The snapshot saved on *petshop-openapi-spec.json* will allow us to still have a version that builds even if the spec changes.
54
+
1. Create a text file named *petshop-openapi-spec.json* at the root of the project. Copy the OpenAPI spec from [here](https://petstore.swagger.io/v2/swagger.json) and save it in the file. It's best to copy a snapshot of the spec instead of reading it online during the build. You always want a consistently reproducible build that depends only on the input. Consuming the API directly could transform a build which works today to a build which fails tomorrow from the same source. The snapshot saved on *petshop-openapi-spec.json* will allow us to still have a version that builds even if the spec changes.
55
55
56
56
1. Next, modify PetShopRestClient.csproj and add a [MSBuild targets](msbuild-targets.md) to generate the client during build process.
57
57
@@ -121,7 +121,7 @@ Congratulations! Now, you can execute the program to see how it works.
121
121
122
122
In many cases, using the `Exec` task is good enough to execute an external tool to do something like REST API client code generation, but what if you want to allow REST API client code generation if and only if you don't use an absolute Windows path as input? Or what if you need to calculate in some way where the executable is? When there's any situation where you need to execute some code to do extra work, the [MSBuild Tool Task](/dotnet/api/microsoft.build.utilities.tooltask) is the best solution. The `ToolTask` class is an abstract class derived from MSBuild `Task`. You can define a concrete subclass, which creates a custom MSBuild task. This approach lets you run any code that is needed to prepare for command execution. You should read the tutorial [Create a custom task for code generation](tutorial-custom-task-code-generation.md) first.
123
123
124
-
You'll create a custom task derived from [MSBuild ToolTask](/dotnet/api/microsoft.build.utilities.tooltask) which will generate a REST API client, but it will be designed to emit an error if you try to reference the OpenApi spec using an http address. NSwag supports an http address as OpenApi spec input, but for the purposes of this example, let's suppose there's a design requirement to disallow that.
124
+
You'll create a custom task derived from [MSBuild ToolTask](/dotnet/api/microsoft.build.utilities.tooltask) which will generate a REST API client, but it will be designed to emit an error if you try to reference the OpenAPI spec using an http address. NSwag supports an http address as OpenAPI spec input, but for the purposes of this example, let's suppose there's a design requirement to disallow that.
125
125
126
126
The complete code is in this `PetReaderToolTaskExample` folder; you can download and take a look. In this tutorial, you'll go through step by step and learn some concepts that you can apply to your own scenarios.
127
127
@@ -237,7 +237,7 @@ The next step is to create an app that uses the task.
1. Inthe `PetRestApiClient` project, createatextfilenamed*petshop-openapi-spec.json* (intheprojectfolder). ToaddtheOpenApispec, copythecontentfrom [here](https://petstore.swagger.io/v2/swagger.json) into the file. We like a reproducible build that depends only on the input, as discussed previously. In this example, you'll raise a build error if a user chooses a URL as the OpenApi spec input.
240
+
1. Inthe `PetRestApiClient` project, createatextfilenamed*petshop-openapi-spec.json* (intheprojectfolder). ToaddtheOpenAPIspec, copythecontentfrom [here](https://petstore.swagger.io/v2/swagger.json) into the file. We like a reproducible build that depends only on the input, as discussed previously. In this example, you'll raise a build error if a user chooses a URL as the OpenAPI spec input.
241
241
242
242
> [!IMPORTANT]
243
243
>Ageneralrebuildwon't work. You'llseeerrorsthatindicateit's unable to copy or delete `RestApiClientGenerator`.dll'. Thisisbecauseit'stryingtobuildtheMBuildcustomtaskinthesamebuildprocesswhichusesit. Select `PetReaderToolTaskConsoleApp` andrebuildonlythatproject. TheanothersolutionisputthecustomtaskinacompletelyindependentVisualStudiosolutionasyoudidin [Tutorial:Createacustomtask](tutorial-custom-task-code-generation.md) example.
@@ -276,7 +276,7 @@ The next step is to create an app that uses the task.
0 commit comments