问题
The visual studio code terminal is not working.
The shortcut ctrl+" for the terminal is not working.
Error:
The terminal process terminated with exit code: {0}
The terminal process command
'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' failed to launch (exit code: {2})
回答1:
Try creating an exception rule for winpty-agent.exe in you antivirus program.
File location:
C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar.unpacked\node-pty\build\Release\winpty-agent.exe
回答2:
Vscode terminal currently does not work with the program Malwarebytes. You will have to uninstall until a fix is made. Antivirus related software seems to be the main culprit.
回答3:
Had the same problem. For me it helped to start VS code as admin... I'm on a semi-enterprise IT-controlled environment.
回答4:
I excluded "Microsoft VS Code" folder from ransomware detection, and now I can open a terminal window.
Thanks, Peter
来源:https://stackoverflow.com/questions/57520651/the-terminal-process-command-failed-to-launch-exit-code0-and-exit-code2