【发布时间】:2018-04-05 22:39:40
【问题描述】:
我正在尝试让 VS Code 中的集成控制台使用我机器上安装的最新版本的 Powershell。我已查看并遵循以下链接中的说明。 http://vscode-docs1.readthedocs.io/en/latest/editor/integrated-terminal/
我遇到的问题是如果我关闭了集成控制台并使用了显示集成控制台命令 (Ctrl+Shift+P >Powershell:显示集成控制台)然后它会打开 Powershell v1.6。如果我然后点击 New Termainal 按钮(shell 选择器的加号),新实例将正确使用 Powershell v5.1。我如何做到这一点,这样我就不必打开一个新的 shell 来使用当前版本的 PS?
我尝试使用弹出对话框“您可以通过选择自定义按钮来更改默认终端外壳”来选择 Powershell。以及将以下内容添加到我的用户设置文件中。
"powershell.powerShellExePath": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
编辑: 我还应该注意,Powershell v1.6 也是以添加到我的用户设置文件中的以下行开头的版本。
"powershell.integratedConsole.showOnStartup": true
【问题讨论】:
标签: powershell visual-studio-code