python-3.xpowershellvisual-studio-code

How to change VS Code Default Terminal to python


I am using Visual Studio Code on my Windows 10 PC. I want to change my default terminal from 'Windows PowerShell' to 'Python' (on Windows). Someone help me solve this issue.


Solution

  • Press Ctrl+Shift+P to bring up the command palette and run the Terminal: Select Default Profile command:

    Run command

    Select Default Profile

    If Python does not appear here, add a profile for it manually in your JSON configuration. Press Ctrl+Shift+P and run the Preferences: Open User Settings (JSON) command:

    enter image description here

    Add the following lines in your JSON config file and save it:

    "terminal.integrated.profiles.windows": {
        "Python": {
            "path": "python",
            "args": []
        }
    },
    

    Afterwards you should be able to select Python as your default terminal profile.