The terminal process command failed to launch exit code:0 and exit code:2

徘徊边缘 提交于 2020-03-01 01:39:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!