Microsoft Visual Studio 2022 Debug Console instead of cmd.exe

Oleg T 6 Reputation points


after I installed Visual Studio 2022, console programs started via Ctrl+F5 are run inside Visual Studio Debug console, instead of cmd.exe.

It is very inconvenient because if I start the program again, it is run in the same console, and I want it to run in a separate window, to compare the results.

How can I return old behaviour of running my programs in cmd.exe using Ctrl+F5? I tried turning off and on "automatically close the console when debugging stops", it does not help.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,564 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,376 Reputation points Microsoft Vendor

    Hi @Oleg T, 

    Welcome to Microsoft Q&A!

    What is your target framework? .NET or .NET Framework? 

    Based on my testing for C# Console App (.NET Framework) project, it is by default running in cmd.exe and in a separate window.

    If it targets .NET Framework and runs in Visual Studio Debug Console instead of cmd.exe, please right-click on your project in Solution explorer > Properties > Debug > select ‘Start external program:’ > Browse to C:\Windows\System32\cmd.exe

    If it targets .NET or .NET Core, please right-click on your project > Properties > Debug > General > click on ‘Open debug launch profiles UI’ > Create a new executable profile > Browse to: C:\Windows\System32\cmd.exe.

    Then, select launch profile named Profile1 and start without debugging. It will run in cmd.exe and create a new window.

    User's image

    User's image



    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.