0

У меня в настоящее время проблема с визуальным кодом студии и erlang, у меня есть erlang/OTP, установленный на моем ПК, и я установил плагин erlang для визуального кода студии, однако я не может запустить erlang из внутреннего окна терминала. Когда я пытаюсь получить эту ошибку:Erlang не работает с внутренним терминалом в Visual Studio Код

erl : The term 'erl' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the 
path is correct and try again. 
At line:1 char:1 
+ erl 
+ ~~~ 
+ CategoryInfo   : ObjectNotFound: (erl:String) [], CommandNotFoundException 
+ FullyQualifiedErrorId : CommandNotFoundException 

любая помощь будет принята с благодарностью.

+0

* Я установил плагин erlang * - Можете ли вы немного сузить его? – 7stud

+0

Можете ли вы добавить комментарий к нижней части моего ответа, описывая, что сработало для вас? Это поможет другим людям. – 7stud

ответ

3

От VS docs

The shell [that is] used [by VS] defaults to $SHELL on Linux and OS X, and %COMSPEC% on Windows. These can be overridden manually by setting terminal.integrated.shell.* in settings.

Так что я хотел бы проверить, что значение вашей переменной %COMSPEC% среды. Или, вы можете переопределить %COMSPEC% в настройках VS:

От VS docs:

Correctly configuring your shell on Windows is a matter of locating the right executable. VS Code defaults to the %COMSPEC% environment variable on Windows which typically points to the 32-bit version of cmd.exe.

Below are a list of common shell executables and their default locations:

// 64-bit cmd if available, otherwise 32-bit 
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe" 
// 64-bit PowerShell if available, otherwise 32-bit 
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe" 
// Git Bash 
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe" 
// Bash on Ubuntu (on Windows) 
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe" 

Вы также можете проверить, если путь к Эрл находится в переменной %PATH% среды, и если не добавить его. Вы когда-либо успешно запускали оболочку erlang раньше, например, после установки erlang, чтобы проверить, что он работает?

+1

Извините, я был занят, я исправил его, добавив это в мои настройки: '" terminal.integrated.shell.windows ":" C: \\ Program Files \\ erl8.2 \\ bin \\ erl.exe " , "terminal.integrated.cwd": "A: \\ Documents \\ Folder \\ Erlang" 'Я также установил другую версию erlang, у меня были проблемы с версией с официального сайта, однако, если вы загрузили с erlang решение это работает, не знаю, почему –