1

I messed up the configuration in VS Code (Win 10) to have cmd.exe for my integrated terminal. I applied the general option to change it to

terminal.integrated.shell.windows=cmd.exe

enter image description here

However, when selecting the default shell I am not getting the option of cmd.exe but a list of other shells:

enter image description here

I added the full path for cmd under C:/Users/AppData/Roaming/Code/User/settings.json:

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

This is settings.json under .vscode:

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

This is settings.json under C:/Users/AppData/Roaming/Code/User/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
    ],
        
}

In addition, restarted VS Code with no success.

What is the issue that is stopping to show cmd.exe as terminal? Why I am getting that list of shells instead of cmd and Powershell for instance?

John Barton
  • 1,581
  • 4
  • 25
  • 51
  • I think the correct way is to open Command Palette > Terminal: Select Default Shell. You should see option for powershell or cmd. You can also try passing in full path to cmd.exe. – Gino Mempin Mar 04 '21 at 23:00
  • Does this answer your question? [Visual Studio Code, how to switch from powershell.exe to cmd.exe](https://stackoverflow.com/questions/42729130/visual-studio-code-how-to-switch-from-powershell-exe-to-cmd-exe) – Gino Mempin Mar 04 '21 at 23:03
  • Thanks @GinoMempin, I provided the full path and restarted VS Code, but it is still showing bash as terminal. When opening the Command Palette and selecting Terminal: Select Default Shell is showing the shell list included in the image above – John Barton Mar 04 '21 at 23:37
  • Re-check that you don't have a bash setting anywhere else (VS code has 3 sets of settings: user, workspace, folder). Try also removing that setting for cmd.exe, restart, then retry the Default Shell command. – Gino Mempin Mar 04 '21 at 23:46
  • Thanks @GinoMempin Looking what are the files for each kind of setting in VSCode – John Barton Mar 04 '21 at 23:58

0 Answers0