Home > Enterprise >  How to disable internal terminal while debugging for .Net Core projects in Visual Studio 2022 previe
How to disable internal terminal while debugging for .Net Core projects in Visual Studio 2022 previe

Time:12-02

As the header says: I want the console-window (old school) to popup on a ASP.NET Core Web API project when debugging.

Currently using Visual Studio 2022 Version 17.5.0 Preview 1.0.

This is how the integrated terminal runs like and is not what I want: Integrated terminal example

There are no options to select in the launchSettings.json for the project

  "profiles": {
    "http": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "http://localhost:5184",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },

Config for debugging: Debugoptions for https profile

To reproduce

  1. Create an ASP.NET Core Web API project with default choices.
  2. Change profile to "https" like this:

https profile change to debug

  1. Press F5 to debug

I have Visual Studio 2019 and it works as expected there, with an console popup.

CodePudding user response:

Go to Tools → Options → Projects and Solutions → ASP .NET Core and change the "Run web server in" option to "External Console"

image showing option to change to external console

After doing so, you should have an external command prompt open like so:

external command prompt showing app running

  • Related