Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to perform this action because the process is running

When I try to run the .NET Core sample program on my MAC. on VScode.

On Terminal is ok.

bogon:projectApp JCNetwork-Mecil9$ dotnet run
Project projectApp (.NETCoreApp,Version=v1.1) was previously compiled. Skipping compilation.

What is your name?
mecil9

Hello, mecil9, on 12/10/2016 at 17:11

but on VSCode ,throw out the error:

What is your name?

mecil9

Unable to perform this action because the process is running.
like image 622
Michael Mecil Avatar asked Dec 10 '16 09:12

Michael Mecil


People also ask

How do I stop a process running in or code?

VS Code maintains a debug session while the program is running, and pressing the Stop button terminates the program.

How do I launch Vscode JSON?

In Visual Studio Code, use shortcut Ctrl + Shift + P to open the Command Palette and type Open launch. json . And it will open the launch. json file for you.


1 Answers

The reason why that is happening is because, you are trying to use the debug console as a terminal to your application and at the time you entered an input, it was already running a process which is your application. So in simple terms, what it is trying to tell you is that, 'I can't do what you are asking me to do now because I'm already running a program'. What you need to do for your console app to run is that, press Ctrl + Shift + D to open the Debug section. At the top, you will find a gear sign which opens a file called 'launch.json'. Search for "externalConsole" and change it from false to true. This will open a console window for you to allow for input. Hope that answers your question.

like image 183
Alf Moh Avatar answered Sep 20 '22 11:09

Alf Moh