如何在 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 (将#修改为@)