Visual studio code не работает терминал

Содержание
  1. Troubleshoot Terminal launch failures
  2. Troubleshooting steps
  3. Additional troubleshooting steps
  4. Exit codes
  5. Common issues on Windows
  6. Make sure compatibility mode is disabled
  7. The terminal exited with code 1 on Windows 10 (with WSL as the default shell)
  8. The terminal not working when running the 32-bit Windows client on 64-bit Windows?
  9. A native exception occurred
  10. Терминал Visual Studio не работает?
  11. 5 ответов
  12. 2ik / cmd.bat
  13. This comment has been minimized.
  14. Maga000005 commented Dec 3, 2019
  15. This comment has been minimized.
  16. Wegazz commented Mar 9, 2020
  17. This comment has been minimized.
  18. borisk85 commented Apr 15, 2020
  19. This comment has been minimized.
  20. nevidomskii8 commented May 5, 2020
  21. This comment has been minimized.
  22. Aranatell commented May 5, 2020
  23. This comment has been minimized.
  24. MaxVilson commented May 5, 2020
  25. This comment has been minimized.
  26. alexalex04261 commented Jun 26, 2020
  27. This comment has been minimized.
  28. Vladimir-xx commented Jul 8, 2020
  29. This comment has been minimized.
  30. BulatSa commented Aug 18, 2020
  31. This comment has been minimized.
  32. MedvedievMaksym commented Aug 18, 2020
  33. This comment has been minimized.
  34. Kitanit commented Aug 23, 2020
  35. This comment has been minimized.
  36. gambit-bgr commented Sep 16, 2020
  37. This comment has been minimized.
  38. KniginAleksey commented Oct 15, 2020
  39. This comment has been minimized.
  40. Kirill-Sakov commented Dec 7, 2020
  41. This comment has been minimized.
  42. gmyza123 commented Jan 11, 2021
  43. This comment has been minimized.
  44. Nikolasgrizli commented Jan 19, 2021
  45. This comment has been minimized.
  46. pastyrMisha commented Jan 19, 2021
  47. This comment has been minimized.
  48. MuhammadAli0728 commented Jan 28, 2021
  49. This comment has been minimized.
  50. Hyperboloider commented Jan 31, 2021
  51. This comment has been minimized.
  52. tarick-kr commented Feb 2, 2021
  53. This comment has been minimized.
  54. WebAiz commented Mar 29, 2021
  55. This comment has been minimized.
  56. uchenik1 commented Apr 3, 2021
  57. This comment has been minimized.
  58. PaulMartyn commented Apr 9, 2021
  59. This comment has been minimized.
  60. AndreySavchenkov commented Jun 14, 2021
  61. This comment has been minimized.
  62. pow3r-prog commented Jun 16, 2021
  63. This comment has been minimized.
  64. konstantindidenko commented Jul 27, 2021
  65. This comment has been minimized.
  66. OlgaLavrishcheva commented Jul 27, 2021
  67. This comment has been minimized.
  68. bochkarevatat commented Jul 27, 2021
  69. This comment has been minimized.
  70. timshinsergey commented Aug 17, 2021
  71. This comment has been minimized.
  72. VladymyrDedeskul commented Aug 17, 2021
  73. This comment has been minimized.
  74. serg-pozi commented Aug 29, 2021
  75. This comment has been minimized.
  76. iqhater commented Sep 2, 2021
  77. This comment has been minimized.
  78. artemyunusov commented Sep 4, 2021

Troubleshoot Terminal launch failures

If you are new to using the Visual Studio Code Integrated Terminal, you can learn more in the Integrated Terminal user guide. There you can read how to configure the terminal, as well as review answers to common questions.

Below are specific troubleshooting steps, if the user guide hasn’t helped you diagnose the launch failure. The troubleshooting steps, such as checking your settings and enabling logging, apply to all platforms that support VS Code; macOS, Linux, and Windows.

Note: If you’re on Windows, review the common issues on Windows section first.

Troubleshooting steps

To troubleshoot Integrated Terminal launch failures in Visual Studio Code, follow these steps to diagnose issues:

Check your user settings. Review these terminal.integrated settings that could affect the launch:

  • terminal.integrated.shell. — The path of the shell that the terminal uses.
  • terminal.integrated.shellArgs. — The command-line arguments when launching the shell process.
  • terminal.integrated.cwd — The current working directory (cwd) for the shell process.
  • terminal.integrated.env. — Environment variables that will be added to the shell process.
  • terminal.integrated.inheritEnv — Whether new shells should inherit their environment from VS Code.
  • terminal.integrated.automationShell. — Shell path for automation-related terminal usage like tasks and debug.
  • terminal.integrated.splitCwd — Controls the current working directory a split terminal starts with.
  • terminal.integrated.windowsEnableConpty — Whether to use ConPTY for Windows terminal process communication.

You can review settings in the Settings editor (File > Preferences > Settings) and search for specific settings by the setting ID.

A quick way to check if you have changed settings that you might not be aware of, is to use the @modified filter in the Settings editor.

Most Integrated Terminal settings will need to be modified directly in your user settings.json JSON file. You can open settings.json via the Edit in settings.json link in the Settings editor or with the Preferences: Open Settings (JSON) command from the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ).

Test your shell directly. Try running your designated integrated terminal shell outside VS Code from an external terminal or command prompt. Some terminal launch failures may be due to your shell installation and are not specific to VS Code. The exit codes displayed come from the shell and you may be able to diagnose shell issues by searching on the internet for the specific shell and exit code.

Use the most recent version of VS Code. Each VS Code monthly release has many updates and fixes and may include integrated terminal improvements. You can check your VS Code version via Help > About (on macOS Code > About Visual Studio Code). To find the latest version of VS Code, go to the VS Code release notes. You may also want to check that you have installed the latest version of your shell.

Enable trace logging. You can enable trace logging and capture a log when launching the terminal. Logging often reveals what is wrong as all arguments used to create the terminal process/pty are recorded. Bad shell names, arguments, or environment variables can cause the terminal to not launch. Keep this log for later if your problem isn’t solved.

Additional troubleshooting steps

If none of these steps helped solve the issue, you can also try:

  • Ask about it on Stack Overflow, often launch issues are related to environment setup and not a problem with VS Code.
  • If the terminal is being launched from an extension, report the issue to the extension by opening the issue reporter (Help > Report Issue) and set File On = «An Extension»
  • If you believe it to be a bug with VS Code, report the issue using the issue reporter (Help >Report Issue). The issue reporter will autofill relevant information, see Creating great terminal issues for what else to include in the report.
  • If you’re on Windows 10 1809 (build 17763) or below, the issue is related to the legacy «winpty» backend. Upgrading to Windows 1903 (build 18362) will move you onto the new «conpty» backend that is built by Microsoft and could fix your problem.

Exit codes

The exit codes displayed in the terminal launch failure notification are returned from the shell process and are not generated by VS Code. There are many available shells that can be used in the terminal and hundreds of possible exit codes. Try searching on the internet for your specific shell and exit code (for example, «PowerShell 4294901760») and you may find specific suggestions or known issues related to your terminal launch failure.

Common issues on Windows

Make sure compatibility mode is disabled

When upgrading to Windows 10, some apps may have compatibility mode turned on automatically. When this happens with VS Code, the terminal breaks as it does some low level things to enable the emulation it uses. You can check and disable compatibility mode by right-clicking on the VS Code executable and selecting properties, then uncheck the Run this program in compatibility mode option in the compatibility tab.

The terminal exited with code 1 on Windows 10 (with WSL as the default shell)

This can happen if Windows Subsystem for Linux (WSL) is not set up with a valid default Linux distribution.

Note: ‘docker-desktop-data’ is not a valid distribution.

  • Open PowerShell and enter wslconfig.exe /l to confirm WSL is installed correctly and list the currently available Linux distributions within your system. Confirm a valid distribution has (default) next to it.
  • To change the default distribution, enter wslconfig.exe /setdefault «distributionNameAsShownInList»

The terminal not working when running the 32-bit Windows client on 64-bit Windows?

The easy fix for this issue is to use the 64-bit version. If you must use the 32-bit version, you need to use the sysnative path when configuring your shell path instead of System32. Adding this setting should fix the issue:

A native exception occurred

Typically this error occurs due to anti-virus software intercepting and blocking the winpty/conpty components from creating the terminal process. To work around this error, you can exclude the following file from your anti-virus scanning:

Reporting this issue to the Anti-virus team can also help stamp out the issue all together.

Источник

Терминал Visual Studio не работает?

Я установил код Visual Studio. Но я ничего не могу набрать в терминале. Как я могу исправить эту проблему?

5 ответов

Нажмите кнопку переключения передач внизу слева и перейдите в командную палитру. Введите терминал и посмотрите, помогает ли открытие нового терминала, если нет, в раскрывающемся списке появятся несколько других опций, которые вы можете попробовать, чтобы решить проблему.

Нажмите на шестеренку в левом нижнем углу кода Visual Studio, нажмите на настройки, на терминале типа настроек поиска и посмотрите, есть ли назначенное значение или нет, если не сделать что-то вроде «terminal.external.windowsExec»: «C:\\WINDOWS\\System32\\cmd.exe» или что-либо еще для Mac или Linux

Ну, у меня та же проблема, и я сбросил все измененные настройки:

Нажмите на двигатель

Нажмите на меню справа 3 точки

Нажмите на Показать измененные настройки

Появится список настроек, поместите мышь в левую часть названия настройки.

Небольшой egine появляется и нажмите Сброс настроек

Закройте и откройте программное обеспечение VS

После этого терминал снова заработал.

У меня была такая же проблема с терминалом. Этот терминал не работает в VSCODE. Я исправил эту проблему, используя 32-битную версию VSCode-win32-ia32-1.43.1

Так что используйте 32-битное приложение VSCode-win32-ia32-1.43.1

В моем случае ctrl + shift + p (открытие палитры команд, как ответил @ MasterYork42) и выбор Terminal:Clear .

Источник

2ik / cmd.bat

Ошибка:
.\venv\Scripts\activate : Невозможно загрузить файл C:\path\venv\Scripts\activate.ps1, так как выполнение сценариев отключено в этой системе.
Для получения дополнительных сведений см. about_Execution_Policies по адресу http://go.microsoft.com/fwlink/?LinkID=135170.
строка:1 знак:1
.\venv\Scripts\activate
CategoryInfo : Ошибка безопасности: (:) [], PSSecurityException
FullyQualifiedErrorId : UnauthorizedAccess
Решение проблемы:
— Открываем терминал PowerShell от админа.
— Вставляем и запускаем — Set-ExecutionPolicy RemoteSigned
— На вопрос отвечаем — A

This comment has been minimized.

Copy link Quote reply

Maga000005 commented Dec 3, 2019

Ошибка:
.\venv\Scripts\activate : Невозможно загрузить файл C:\path\venv\Scripts\activate.ps1, так как выполнение сценариев отключено в этой системе.
Для получения дополнительных сведений см. about_Execution_Policies по адресу http://go.microsoft.com/fwlink/?LinkID=135170-да.
строка:1 знак:1
.\venv\Скрипты\активировать

This comment has been minimized.

Copy link Quote reply

Wegazz commented Mar 9, 2020

Стоит добавить, что команду Set-ExecutionPolicy RemoteSigned следует запускать именно в терминале — PowerShell (под администратором).
Потому как в если запустить ее просто в командной строке (админ) вылетает АшиПка:

This comment has been minimized.

Copy link Quote reply

borisk85 commented Apr 15, 2020

This comment has been minimized.

Copy link Quote reply

nevidomskii8 commented May 5, 2020

все там помогло.
нужно только найти где эта PowerShell хранится и запусить её от админа.

This comment has been minimized.

Copy link Quote reply

Aranatell commented May 5, 2020

Вот результат ввода

Set-ExecutionPolicy : Оболочка Windows PowerShell успешно обновила вашу политику выполнения, но данный параметр переопр
еделяется политикой, определенной в более конкретной области. В связи с переопределением оболочка сохранит текущую поли
тику выполнения «AllSigned». Для просмотра параметров политики выполнения введите «Get-ExecutionPolicy -List». Для полу
чения дополнительных сведений введите «Get-Help Set-ExecutionPolicy».
строка:1 знак:1

ошибка так же выдаётся

This comment has been minimized.

Copy link Quote reply

MaxVilson commented May 5, 2020

все помогло, спасибо, добрые люди)

This comment has been minimized.

Copy link Quote reply

alexalex04261 commented Jun 26, 2020

Спасибо большое! Помогло!

This comment has been minimized.

Copy link Quote reply

Vladimir-xx commented Jul 8, 2020

This comment has been minimized.

Copy link Quote reply

BulatSa commented Aug 18, 2020

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

This comment has been minimized.

Copy link Quote reply

MedvedievMaksym commented Aug 18, 2020

This comment has been minimized.

Copy link Quote reply

Kitanit commented Aug 23, 2020

This comment has been minimized.

Copy link Quote reply

gambit-bgr commented Sep 16, 2020

This comment has been minimized.

Copy link Quote reply

KniginAleksey commented Oct 15, 2020

Спасибо, заработало. Большое спасибо. Выполнил эту команду и все ОК
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

This comment has been minimized.

Copy link Quote reply

Kirill-Sakov commented Dec 7, 2020

«Set-ExecutionPolicy RemoteSigned» команда помогла

This comment has been minimized.

Copy link Quote reply

gmyza123 commented Jan 11, 2021

Set-ExecutionPolicy RemoteSigned не сработала в Windows PowerShell . Там выскочило сообщение:
Set-ExecutionPolicy : Оболочка Windows PowerShell успешно обновила вашу политику выполнения, но данный параметр переопр
еделяется политикой, определенной в более конкретной области. В связи с переопределением оболочка сохранит текущую поли
тику выполнения «AllSigned». Для просмотра параметров политики выполнения введите «Get-ExecutionPolicy -List». Для полу
чения дополнительных сведений введите «Get-Help Set-ExecutionPolicy».
строка:1 знак:1

Тогда я прописал ту же команду только в командной строке: C:\Users\Admin>powershell Set-ExecutionPolicy RemoteSigned
Терминал указал прописать в Windows PowerShell команду Set-ExecutionPolicy -Scope CurrentUser
Теперь всё работает

This comment has been minimized.

Copy link Quote reply

Nikolasgrizli commented Jan 19, 2021

Спасибо тебе, добрый человек! проблема была с запуском tars cli но тоже решилась твоим способом.

This comment has been minimized.

Copy link Quote reply

pastyrMisha commented Jan 19, 2021

Спасибо, помогло! Делал для VS Code!

This comment has been minimized.

Copy link Quote reply

MuhammadAli0728 commented Jan 28, 2021

все помогло, спасибо, добрые люди

This comment has been minimized.

Copy link Quote reply

Hyperboloider commented Jan 31, 2021

респект! все работает

This comment has been minimized.

Copy link Quote reply

tarick-kr commented Feb 2, 2021

Спасибо. Всё заработало.

This comment has been minimized.

Copy link Quote reply

WebAiz commented Mar 29, 2021

set-ExecutionPolicy RemoteSigned
этот скрипт нужно запускать именно в powershell ! Мне помогло спасибо

This comment has been minimized.

Copy link Quote reply

uchenik1 commented Apr 3, 2021

урааа Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser все заработала

This comment has been minimized.

Copy link Quote reply

PaulMartyn commented Apr 9, 2021

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

команда помогла, спасибо1

This comment has been minimized.

Copy link Quote reply

AndreySavchenkov commented Jun 14, 2021

сработала именно команда «Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser» в power shell запущеном от администратора

This comment has been minimized.

Copy link Quote reply

pow3r-prog commented Jun 16, 2021

Спасибо большое, помогло!

This comment has been minimized.

Copy link Quote reply

konstantindidenko commented Jul 27, 2021

Спасибо! Ушла проблема в WebStorm.

This comment has been minimized.

Copy link Quote reply

OlgaLavrishcheva commented Jul 27, 2021

Спасибище огромное! В WS проблема решена.

This comment has been minimized.

Copy link Quote reply

bochkarevatat commented Jul 27, 2021

This comment has been minimized.

Copy link Quote reply

timshinsergey commented Aug 17, 2021

Запустил Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser через powerShell с правами админа, в vscode теперь могу использовать vue-cli.
Спасибо!

This comment has been minimized.

Copy link Quote reply

VladymyrDedeskul commented Aug 17, 2021

спасибо, помогло решить проблему

This comment has been minimized.

Copy link Quote reply

serg-pozi commented Aug 29, 2021

Спасибо, в phpStorm тоже решило проблему!

This comment has been minimized.

Copy link Quote reply

iqhater commented Sep 2, 2021

Thanks! Works as expected.

This comment has been minimized.

Copy link Quote reply

artemyunusov commented Sep 4, 2021

урааа Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser все заработала

Источник

Читайте также:  Postman basic auth не работает
Оцените статью