Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode PowerShell error: The terminal process failed to launch: A native exception occurred during launch (Cannot create process, error code: 740)

Suddenly I started to get the next error message when trying to open the PowerShell Terminal window in VSCode:

The terminal process failed to launch: A native exception occurred during launch (Cannot create process, error code: 740).

What is the reason for it?

(There are similar questions on SO, but with other error codes, which are not helpful)

like image 296
elshev Avatar asked Jun 08 '26 23:06

elshev


1 Answers

Here is a similar question on GitHub. In short, the problem is in pwsh.exe → Properties → 'Compatibility' tab → 'Run this program as an administrator' setting. In my case pwsh.exe is C:\Program Files\PowerShell\7\pwsh.exe

You can fix it in two ways:

  1. Run Visual Studio Code as Administrator (which is not always a good option)
  2. Uncheck this setting for pwsh.exe
like image 180
elshev Avatar answered Jun 11 '26 13:06

elshev