微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在 Visual Studio Code 中从 bash 切换到 cmd.exe?

如何解决如何在 Visual Studio Code 中从 bash 切换到 cmd.exe?

我弄乱了 VS Code (Win 10) 中的配置,以便为我的集成终端安装 cmd.exe。我应用了常规选项将其更改为

terminal.integrated.shell.windows=cmd.exe

enter image description here

但是,在选择认 shell 时,我没有得到 cmd.exe 的选项,而是其他 shell 的列表:

enter image description here

我在 C:/Users/AppData/Roaming/Code/User/settings.json 下添加了 cmd 的完整路径:

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",

这是.vscode下的settings.json:

{
    "python.testing.pytestArgs": [
        "tests"
    ],"python.testing.unittestEnabled": false,"python.testing.nosetestsEnabled": false,"python.testing.pytestEnabled": true,"python.pythonPath": "venv/bin/python"
}

这是 C:/Users/AppData/Roaming/Code/User/settings.json 下的 settings.json:

{
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe","files.autoSave": "afterDelay","files.insertFinalNewline": true,"python.linting.Flake8Enabled": true,"terminal.integrated.scrollback":1000,"editor.codeActionsOnSave": null,"http.systemCertificates": false,"http.proxyStrictSSL": false,"http.proxySupport": "off","editor.formatOnPaste": true,"editor.rulers": [
        120
    ],}

此外,重新启动 VS Code 没有成功。

停止将 cmd.exe 显示为终端的问题是什么? 例如,为什么我得到的是 shell 列表而不是 cmd 和 Powershell?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。