VS Code Terminal Closes Error Solution

The terminal process command 'CProgram FilesGitbinbash.exe' failed to launch (exit code {2})
Share:

About

A couple of days ago I stumbled upon these errors. I was unable to start up my C# .NET Core app and debug it(Task “clean” failed with exit code “1”). When I tried to access the terminal it crashed leaving me with the following errors:

  • The terminal process command ‘C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe’ failed to launch (exit code: {2})
  • The terminal process terminated with exit code: {1}
  • The terminal process terminated with exit code: {0}

Solution

I saw quite a few cases of these errors showing up for different reasons on the VS Code Github issues pages. In my particular case, the problem was the antivirus. Apparently, it was blocking something. The solution was to simply whitelist(exclude from detection) the installation directory of Visual Studio Code.
Hopefully, this has helped.
Share:

Comments

Leave a Reply

Your email address will not be published.

The following GDPR rules must be read and accepted:
This form collects your name, email and content so that we can keep track of the comments placed on the website. For more info check our privacy policy where you will get more info on where, how and why we store your data.

Advertisment ad adsense adlogger