microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.06k stars 29.24k forks source link

Default Integrated Terminal Shell sometimes not used on launch for remote workspaces #128763

Closed jmanthony3 closed 3 years ago

jmanthony3 commented 3 years ago

Issue Type: Bug

Opening VS Code automatically creates an integrated shell window, which is what I want. However, despite setting the "cmd.exe" shell as the default and commenting out the other options that only the "Command Prompt" shell is listed to create another terminal windows, the automatically created integrated shell window opens with PowerShell. I don't want PowerShell. If I add another terminal window, then that new window uses the "Command Prompt" shell.

VS Code version: Code 1.58.1 (2aeda6b18e13c4f4f9edf6667158a6b8d408874b, 2021-07-13T06:58:28.115Z) OS version: Windows_NT x64 10.0.19042 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 x 2904)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.88GB (4.44GB free)| |Process Argv|--crash-reporter-id d17dcf09-a9c2-4505-9b94-904b43e5d3ee| |Screen Reader|no| |VM|0%|
vscodebot[bot] commented 3 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

jmanthony3 commented 3 years ago

Not a duplicate of suggestion as I am not splitting the terminal window. My issue pertains to initially created terminal window upon VS Code launch.

neillindberg commented 3 years ago

default_ignored I searched for and found this issue is the same, just with different default settings. You can see in the dropdown that Git is my default shell, but after updating VSCode today it reopened with Powershell terminal for some reason. This has happened for several updates now.

boldfrog1805 commented 3 years ago

Have same problem. If VSC exits with at least one Integrated Terminal running, it will re-run a single Integrated Termianl on startup. However it will not re-run any of the profiles that were previously running, nor the current default profile - it will just re-run the out-of-the-box default (in my case, vanilla bash to WSL2). Would be good to at least re-run the current default profile (best), or else have an option to not remember that an Integrated Terminal was running previously (OK).

meganrogge commented 3 years ago

I believe this is already fixed, can you see if you can reproduce in the Insiders build?

boldfrog1805 commented 3 years ago

Hi Megan,

Yes, can reproduce, still happens on the Insiders build (1.59.0-insider).

David

On Wed, 28 Jul 2021, at 2:03 AM, Megan Rogge wrote:

I believe this is already fixed, can you see if you can reproduce in the Insiders build https://code.visualstudio.com/insiders?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/128763#issuecomment-887637981, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJIVXYZHTKQQFFEF2BQLBLTZ3KGVANCNFSM5ANYZ7RQ.

amalaussena commented 3 years ago

Hi, I am experiencing the same problem as reported above with Visual - see attached reproduction of the issue in a little movie. It would be great if there were a fix for that issue, which is a blocking one on my project. Thanks, Anais

https://user-images.githubusercontent.com/88326298/127863240-04b1ca9e-4333-49a0-9bf1-fcac12ea37d1.mp4

meganrogge commented 3 years ago

i can't repro tihis. pls provide me with your settings @amalaussena

amalaussena commented 3 years ago

https://github.com/microsoft/vscode/issues/129971

Anais Malaussena

@.**@.> www.epo.orghttp://www.epo.org

Please consider the environment before printing this email. From: Megan Rogge @.> Sent: 02 August 2021 17:12 To: microsoft/vscode @.> Cc: Anais Malaussena @.>; Mention @.> Subject: Re: [microsoft/vscode] Default Integrated Terminal Shell (#128763)

i can't repro tihis. pls provide me with your settings @amalaussenahttps://github.com/amalaussena

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode/issues/128763#issuecomment-891107092, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVB4BGWEAFY6ABHBETD525DT22YVZANCNFSM5ANYZ7RQ.

meganrogge commented 3 years ago

can anyone provide me with their user settings? to do this, ctrl + comma and click the document looking button. copy that file

boldfrog1805 commented 3 years ago

I'm not sure how @amalaussena 's video shows the problem? The problem happens when VSC launches (as the OP said), and that is not in the video. Anyway, my settings are below. I've pasted both User and Workspace as I have settings across both. And the terminal settings are in Workspace at the bottom. Hope this helps!

User

{ "files.associations": { ".cform": "yaml", ".gql": "graphql" }, "yaml.customTags": [ "!And", "!And sequence", "!If", "!If sequence", "!Not", "!Not sequence", "!Equals", "!Equals sequence", "!Or", "!Or sequence", "!FindInMap", "!FindInMap sequence", "!Base64", "!Join", "!Join sequence", "!Cidr", "!Ref", "!Sub", "!Sub sequence", "!GetAtt", "!GetAZs", "!ImportValue", "!ImportValue sequence", "!Select", "!Select sequence", "!Split", "!Split sequence" ], "yaml.validate": false, "timeline.excludeSources": [], "aws.samcli.location": "/home/linuxbrew/.linuxbrew/bin/sam", "git.enableSmartCommit": true, "git.confirmSync": false, "explorer.confirmDragAndDrop": false, "aws.onDefaultRegionMissing": "ignore", "aws.profile": "profile:default", "eslint.validate": [ "javascript", "javascriptreact", "vue" ], "terminal.integrated.copyOnSelection": true, "python.terminal.activateEnvironment": false, "remote.SSH.remotePlatform": { "emma": "linux", "emma_media": "linux" }, "workbench.editorAssociations": { "*.ipynb": "jupyter-notebook" }, "javascript.updateImportsOnFileMove.enabled": "never", "python.languageServer": "Pylance", "redhat.telemetry.enabled": false, "notebook.cellToolbarLocation": { "default": "right", "jupyter-notebook": "left" } }

Workspace

{ "folders": [ { "path": ".." } ], "settings": { "python.pythonPath": ".venv/bin/python", "python.linting.pylintEnabled": true, "python.linting.enabled": true, "cfnLint.path": "./.venv/bin/cfn-lint", "editor.rulers": [ 100 ], "terminal.integrated.profiles.linux": { "Project": { "path": "bash", "args": [ "--rcfile", "${workspaceFolder}/.bashrc" ] } }, "terminal.integrated.defaultProfile.linux": "Project" } }

amalaussena commented 3 years ago

Hi @aupsloptp thanks for your help in this issue. The issue is that even if bash is set as the default terminal, when opening a new terminal VSC always selects cmd and there is no way to change this. This is the behaviour I tried to show in the video.
Based on your settings, are you able to switch from terminal shell eg. either cmd or powershell or bash? It yes, I would be interested to know what is the difference between your settings and mine? Thank you and Best Regards, Anais

TicTak21 commented 3 years ago

I have the similar issue after last update: 1.60.0-insider. Default profile option is still broken.

IllusionMH commented 3 years ago

As mentioned above - issue can be reproduced in latest Insiders build Setting "Command Prompt" or "Git Bash" to terminal.integrated.defaultProfile.windows still launches PowerShell

// "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
// "terminal.integrated.shellArgs.windows": ["--login", "-i"],
"terminal.integrated.profiles.windows": {
    "PowerShell": {
        "source": "PowerShell",
        "icon": "terminal-powershell"
    },
    "Command Prompt": {
        "path": [
            "${env:windir}\\Sysnative\\cmd.exe",
            "${env:windir}\\System32\\cmd.exe"
        ],
        "args": [],
        "icon": "terminal-cmd"
    },
    "Git Bash": {
        "source": "Git Bash"
    }
},
"terminal.integrated.defaultProfile.windows": "Git Bash",

terminal.integrated.profiles.windows is default configuration when you autocomplete this setting in settings.json file. Old *shell* values are commented out.

Default terminal correctly marked in Launch profile dropdown image

Version: 1.60.0-insider (user setup) Commit: 49af1cbe00271ac2ea36cfc5f7352fe31a7b0094 Date: 2021-08-06T06:41:50.275Z OS: Windows_NT x64 10.0.19041

meganrogge commented 3 years ago

in insider's today, there's an issue with the default profile that will be fixed tomorrow - https://github.com/microsoft/vscode/issues/130268

I just re-read the OP description and think I now understand your problem. Commenting out the other shells won't work. You need to set them to null in your settings in order to remove them from appearing in the dropdown.

Please let me know if you are still seeing issues with this in tomorrow's insider's.

boldfrog1805 commented 3 years ago

@meganrogge Can you please comment on the OP's post:

Not a duplicate of suggestion as I am not splitting the terminal window. My issue pertains to initially created terminal window upon VS Code launch.

The key words are "upon VS Code launch".

It does appear that somehow we are now looking at a different problem (the PowerShell one). Note that the OP also says "the automatically created integrated shell window". The problem as the OP described (and me) ONLY happens on VSC launch, not as @IllusionMH described.

See my original post, I am pretty sure that aligns with the OP. If the general consensus is not, then no problem, I will raise a new issue.

Maybe the title of this issue is the misleading bit? Maybe it should have been "Default Integrated Terminal Shell Upon Launch".

adriantorrie commented 3 years ago

image

meganrogge commented 3 years ago

Can't repro, but seems like some people are seeing this still

IllusionMH commented 3 years ago

@meganrogge there was no Insiders release with 690ff9e55e I guess next will be Monday morning.

boldfrog1805 commented 3 years ago

OK, I've had a bit of time to do some debugging here. It looks like the "launch" issue only happens when remote, e.g. WSL or SSH. Steps to reproduce:

  1. Go to Remote Explorer
  2. Connect to WSL or SSH
  3. New window opens with "bash" as integrated terminal type
  4. Select default profile of "tmux" (or anything else besides "bash")
  5. Open new terminal, check that new profile is run instead of old default
  6. Close all terminals
  7. Open new terminal, again should be new profile as expected
  8. Exit VSC (with that single integrated terminal running)
  9. Run VSC
  10. Should start up with integrated terminal, BUT it will be "bash" (not "tmux or whatever you chose as the default)
  11. Confirm the actual default is still valid by firing up a new terminal

If you do the above steps for local (Windows) with say, Command Prompt and PowerShell, there is no bug (i.e. the default terminal is properly used when VSC starts up).

So maybe the issue is in the extensions? That's why it just occurs "sometimes", it depends on the last workspace you used?

GongT commented 3 years ago

It may related with settings.json on remote machine?

I have one "special" linux box, there is no any shell in PATH, so I create a new profile and set absolute path, in remote machine setting, then set it default.

VSCode never run default shell at first, including auto-start when window open, and manually switch to terminal tab.
But it works without any issue from the second one.

jmanthony3 commented 3 years ago

I have been living with the default PowerShell since making this report, but decided to try again to correctly set Command Prompt as default shell on launch. The first image (entitled "Broke") was of my Integrated Profile definitions in settings.json, and the second (entitled "Fixed") is of those definitions now. It seems that the acceptable input for arguments had changed, because now VSC opens a Command Prompt terminal upon launch instead of PowerShell.

broke_default_shell fixed_default_shell

My VSC information:

Version: 1.59.0 (user setup) Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8 Date: 2021-08-04T23:13:12.822Z Electron: 13.1.7 Chrome: 91.0.4472.124 Node.js: 14.16.0 V8: 9.1.269.36-electron.0 OS: Windows_NT x64 10.0.19042

vaindil commented 3 years ago

I am not using a remote workspace and still have this issue (I don't even know what a remote workspace is). All of my dev is done locally, not using WSL or SSH. I do have WSL installed, but my default terminal profile doesn't reference it and I'm not using it in VS Code (as far as I know).

boldfrog1805 commented 3 years ago

@vaindil What is your default terminal profile?

boldfrog1805 commented 3 years ago

@meganrogge Here's a little clue too: If I change the default shell for the user outside of VSC (e.g. via chsh) on WSL (or SSH), then when VSC launches to WSL/SSH, it runs this new default shell. It really does look like that - on launch, to restore an integrated terminal - VSC just runs the default shell of WSL/SSH, be that bash/fish/whatever, and ignores the VSC default shell setting.

aedwardg commented 3 years ago

Even after 690ff9e, I was having an issue where it now recognized the default terminal profile after the terminal has been killed and reopened, but not when a project was first opened.

Turned out to be some kind of caching issue. I was able to resolve by killing all terminals in the project (not just minimizing, but actually killing w/the trashcan icon), closing Insiders and then reopening it to that project.

~Everything seems to be back to normal with the default profile for me now 👍~

EDIT: That only partially solves it. If I close a window with the terminal still open (on the default profile or otherwise), when I reopen Insiders it still defaults to PowerShell on startup for some reason.

Steps to reproduce:

  1. Open Insiders with default terminal profile set to something other than PowerShell.
  2. Kill terminal.
  3. Open new terminal and see default profile working correctly.
  4. Close Insiders with terminal still open.
  5. Open Insiders again and see PowerShell override your default profile on startup.
marcelwgn commented 3 years ago

I have the same issue, when starting vs code, it does not open the terminal with the default shell but rather opens a different shell.

My settings json:

{
    "git.enableSmartCommit": true,
    "editor.fontFamily": "'Cascadia Code', Consolas, Monaco, 'Courier New', monospace",
    "editor.fontLigatures": true,
    "javascript.updateImportsOnFileMove.enabled": "always",
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features"
    },
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "css.lint.duplicateProperties": "warning",
    "css.lint.float": "warning",
    "editor.insertSpaces": false,
    "editor.tabSize": 4,
    "prettier.tabWidth": 4,
    "terminal.integrated.env.windows": {
    },
    "editor.accessibilitySupport": "off",
    "window.zoomLevel": 1,
    "[typescript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "git.autofetch": true,
    "typescript.updateImportsOnFileMove.enabled": "always",
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "git.confirmSync": false,
    "diffEditor.ignoreTrimWhitespace": false,
    "editor.inlineSuggest.enabled": true,
    "github.copilot.list.count": 10,
    "editor.autoClosingBrackets": "never",
    "github.copilot.enable": {
        "*": false,
        "yaml": false,
        "plaintext": false,
        "markdown": false
    },
    "files.exclude": {
        "**/.classpath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/.factorypath": true
    },
    "terminal.integrated.defaultProfile.osx": "pwsh",
    "terminal.integrated.defaultProfile.windows": "pwsh",
}

Version: 1.60.0-insider (Universal) Commit: 71b299184f7908491345aec5e231599c3ae8753b

fockez commented 3 years ago

After the newest upgrade, the vscode can startup with default terminal command prompt now. But when I debug the python code, it is still using the default powershell which cannot activate conda env. It can use the default terminal profile when debugging in 1.59.

kmr0877 commented 3 years ago

rshell which cannot activate conda env. It can use the default terminal

I have the same problem, all my tasks in tasks.json don't work because they are being executed in Powershell, not Git Bash (and I have set Git Bash as the default).

vaindil commented 3 years ago

@vaindil What is your default terminal profile?

These are my only settings.json entries that have terminal in them (other than a bunch of color stuff):

"terminal.integrated.profiles.windows": {
  "cmder": {
    "path": "C:\\WINDOWS\\System32\\cmd.exe",
    "args": [
      "/K",
      "C:\\path\\Cmder\\vendor\\bin\\vscode_init.cmd"
    ]
  }
},
"terminal.integrated.defaultProfile.windows": "cmder",
IllusionMH commented 3 years ago

Looks like startup case (when Terminal view is visible when application starts) partially related to #130268

In #130268 new logic to get find default profile if one is not passed to createTerminal was added https://github.com/microsoft/vscode/blob/0e4ddedb183449624754360c53320c6db96cde1f/src/vs/workbench/contrib/terminal/browser/terminalService.ts#L1111

However if terminal view is visible then createTerminal will immediately called when UI loads. And it will be before _detectProfiles finishes in first _refreshAvailableProfiles call ends. Therefore this._availableProfiles will be undefined during initial call and PowerShell will be launched on Windows (with other default for different OS). https://github.com/microsoft/vscode/blob/0e4ddedb183449624754360c53320c6db96cde1f/src/vs/workbench/contrib/terminal/browser/terminalService.ts#L490-L495


If I add console.log in few places (see details below) it's noticeable why this happens.

Results for case when Terminal view not visible at launch (e.g. Search panel active)

<start with Search tab active>

_refreshAvailableProfiles called
_detectProfiles finished Array(4)
_refreshAvailableProfiles called
_detectProfiles finished (4) [{…}, {…}, {…}, {…}]

<clicked on Terminal tab>

_refreshAvailableProfiles called
createTerminal called {options: {…}, config: {…}, shellLaunchConfig: {…}}
_detectProfiles finished (4) [{…}, {…}, {…}, {…}]
_refreshAvailableProfiles called
_detectProfiles finished (4) [{…}, {…}, {…}, {…}]

In this case Git Bash (my default profile) launched as expected.


On the other hand if Terminal tab active when user launches VS Code app (close VS Code keeping Terminal tab active with Git Bash and launch again)

<start with Terminal tab active>

_refreshAvailableProfiles called
createTerminal called {options: {…}, config: undefined, shellLaunchConfig: {…}} <-- config: undefined instead of Git Bash profile object
_detectProfiles finished (4) [{…}, {…}, {…}, {…}] <-- finishes after createTerminal wasn't able to find default profile
_refreshAvailableProfiles called
_detectProfiles finished (4) [{…}, {…}, {…}, {…}]

<click on + button to create new terminal>

createTerminal called {options: {…}, config: {…}, shellLaunchConfig: {…}} <-- config: {...} - correct Git Bash profile object
_refreshAvailableProfiles called
_detectProfiles finished (4) [{…}, {…}, {…}, {…}]
_refreshAvailableProfiles called
_detectProfiles finished (4) [{…}, {…}, {…}, {…}]

As result first terminal that I see it PowerShell and then Git Bash is created by click on + image

So there should be some mechanism that will force waiting for first _detectProfiles to complete before creating first terminal.


console.log updates ```ts private async _refreshAvailableProfiles(): Promise { console.log('_refreshAvailableProfiles called'); const result = await this._detectProfiles(); console.log('_detectProfiles finished', result); ... ``` ```ts async createTerminal(options?: ICreateTerminalOptions): Promise { const config = options?.config || this._availableProfiles?.find(p => p.profileName === this._defaultProfileName); const shellLaunchConfig = config && 'extensionIdentifier' in config ? {} : this._convertProfileToShellLaunchConfig(config || {}); console.log('createTerminal called', { options, config, shellLaunchConfig }); ... ```
boldfrog1805 commented 3 years ago

@IllusionMH I like! Sounds like you've found it. That might also explain why only WSL/SSH sessions seemed to fail for me when I ran some tests, and not local. Local startups are faster & it may be that the profiles info is loaded in time for the correct terminal profile to be selected. With WSL/SSH there may be extra overhead that forces createTerminal to choose whatever it can.

fockez commented 3 years ago

The recent insider release still open powershell instead of using the default terminal from settings at startup and task running.

thrasher- commented 3 years ago

Also have Git Bash configured as the default profile, however powershell launches on VS Code start-up. Running the latest version of VS Code insiders:

image

dippas commented 3 years ago

For me when (re)launching VSCode with terminal opened the powerShell shows, but if terminal is closed and then manually opened (ctrl + ç) then my default profile (git bash) is shown

victorfeight commented 3 years ago

For me when (re)launching VSCode with terminal opened the powerShell shows, but if terminal is closed and then manually opened (ctrl + ç) then my default profile (git bash) is shown

This can be reproduced on my machine with the following settings:

    "terminal.integrated.profiles.windows": {
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "Git Bash": {
            "source": "Git Bash",
            "icon": "terminal-bash"
        },
    },
    "terminal.integrated.defaultProfile.windows": "Git Bash",

Opening a Project directory from Explorer with VS Code launches Code with a PowerShell terminal window. After deleting the PowerShell window (with delete button), and relaunching terminal Ctrl-` it reverts to Selected Git bash profile.

A temporary solution until this is fixed is to prevent the PowerShell profile from appearing in the menu by setting its source to "null" "PowerShell": { "source": "null", "icon": "terminal-powershell" }, Thereby allowing Git Bash to open again by default.

dippas commented 3 years ago

Opening a Project directory from Explorer with VS Code launches Code with a PowerShell terminal window. After deleting the PowerShell window (with delete button), and relaunching terminal Ctrl-` it reverts to Selected Git bash profile.

A temporary solution until this is fixed is to prevent the PowerShell profile from appearing in the menu by setting its source to "null" "PowerShell": { "source": "null", "icon": "terminal-powershell" }, Thereby allowing Git Bash to open again by default.

It doesn't work setting "null" , it is even an invalid value

Vidfinnx commented 3 years ago

Only workaround i found (after hours of thread reading and trying to edit settings.json with no success in getting it to stick) was downgrading to 1.59 where it functions perfectly, i didn't even know auto upgrades were a thing for vscode, all i know is i was working on a project just fine then later in the afternoon reopened vscode and this extremely annoying thing was happening. I am scared to death of auto updates and to update vscode period because it does this on the stable build as well, directly from the site. I have since now disabled auto updates. I am a coding student who is just now graduating school so my familiarity with vscode is very limited. I am on windows 10 64 bit

alyssathi commented 3 years ago

Having this issue after an auto update as well. Having issues with Windows 10 64 bit ignoring my default profile and opening up powershell.

Vidfinnx commented 3 years ago

Having this issue after an auto update as well. Having issues with Windows 10 64 bit ignoring my default profile and opening up powershell.

Reinstall version 1.59 over the top of 1.60 and disable auto updates, that is what i have resorted to as a work around, just go into your settings and type update and disable them, except the extensions. I didn't lose anything by downgrading this way thank god, it was absolutely driving me nuts though not being able to set it to default and having powershell open for everything regardless of which one i chose.

kohane27 commented 3 years ago

I can report that I'm having the same issue. Rolled back to 1.59 and default shell as Git Bash works again. I also added "update.mode": "none" to settings.json

ValHolla commented 3 years ago

I can confirm, using 1.60.0 still opens using powershell upon launch.

{
    "workbench.startupEditor": "newUntitledFile",
    "files.autoSave": "afterDelay",
    "git.autofetch": true,
    "workbench.editor.untitled.hint": "hidden",
    "python.formatting.blackPath": "/usr/local/bin/black",
    "python.formatting.provider": "black",
    "python.formatting.blackArgs": [
        "--line-length 100"
    ],
    "python.linting.flake8Args": [
        "--max-complexity 18",
        "--max-line-length 100"
    ],
    "python.linting.flake8Path": "/usr/local/bin/flake8",
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook"
    },
    "workbench.iconTheme": "vscode-icons",
    "yaml.customTags": [
        "!And",
        "!And sequence",
        "!If",
        "!If sequence",
        "!Not",
        "!Not sequence",
        "!Equals",
        "!Equals sequence",
        "!Or",
        "!Or sequence",
        "!FindInMap",
        "!FindInMap sequence",
        "!Base64",
        "!Join",
        "!Join sequence",
        "!Cidr",
        "!Ref",
        "!Sub",
        "!Sub sequence",
        "!GetAtt",
        "!GetAZs",
        "!ImportValue",
        "!ImportValue sequence",
        "!Select",
        "!Select sequence",
        "!Split",
        "!Split sequence"
    ],
    "yaml.validate": false,
    "python.venvFolders": [
        "venv"
    ],
    "python.venvPath": "~/venv",
    "window.zoomLevel": 1,
    "security.workspace.trust.untrustedFiles": "open",
    "extensions.supportVirtualWorkspaces": {

        "pub.name": false
    },
    "notebook.cellToolbarLocation": {
        "default": "right",
        "jupyter-notebook": "left"
    },
    "redhat.telemetry.enabled": false,
    "files.eol": "\n",
    "peacock.surpriseMeOnStartup": true,
    "peacock.affectStatusAndTitleBorders": true,
    "peacock.affectTabActiveBorder": true,
    "peacock.affectAccentBorders": true,
    "peacock.affectDebuggingStatusBar": true,
    "peacock.elementAdjustments": {
        "activityBar": "lighten",
        "statusBar": "darken",
        "titleBar": "none"
    },
    "peacock.favoriteColors": [
        {
            "name": "Angular Red",
            "value": "#dd0531"
        },
        {
            "name": "Azure Blue",
            "value": "#007fff"
        },
        {
            "name": "JavaScript Yellow",
            "value": "#f9e64f"
        },
        {
            "name": "Mandalorian Blue",
            "value": "#1857a4"
        },
        {
            "name": "Node Green",
            "value": "#215732"
        },
        {
            "name": "React Blue",
            "value": "#61dafb"
        },
        {
            "name": "Something Different",
            "value": "#832561"
        },
        {
            "name": "Svelte Orange",
            "value": "#ff3d00"
        },
        {
            "name": "Vue Green",
            "value": "#42b883"
        }
    ],
    "terraform.languageServer": {
        "external": true,
        "pathToBinary": "terraform-ls",
        "args": [
            "serve"
        ],
        "maxNumberOfProblems": 100,
        "trace.server": "off"
    },
    "git.enableSmartCommit": true,
    "terminal.integrated.defaultProfile.windows": "Git Bash"
}
tinutmap commented 3 years ago

Confirming the issue still happens when I tried to run django/python and npm debug sessions.

Version: 1.60.0 (user setup)
Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
Date: 2021-09-01T10:41:52.311Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

even when I tried to do the following in settings.json per https://code.visualstudio.com/docs/editor/integrated-terminal#_removing-builtin-profiles The setting "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", helps in 1.59 but when auto updated to 1.60, that was overridden 😢 . Had to roll back to 1.59

{
    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
    "terminal.integrated.profiles.windows": {
        "PowerShell": null,
        "Command Prompt": null,
        "GitBash": {
            "source": "Git Bash"
        },
    },
    "terminal.integrated.automationShell.windows": "GitBash",
    "terminal.integrated.defaultProfile.windows": "GitBash",
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "console": "integratedTerminal",
            "args": [
                "runserver",
                "0.0.0.0:8000"
            ],
            "django": true
        },
        {
            "command": "npm run serve",
            "name": "Run npm serve",
            "request": "launch",
            "type": "node-terminal",
        },
        {
            "name": "vuejs: Chrome",
            "request": "launch",
            "type": "chrome",
            "url": "http://localhost:8080",
            "breakOnLoad": true,
            "sourceMapPathOverrides": {
                "webpack:///src/*": "${webRoot}/*",
                "webpack:///./src/*": "${webRoot}/*",

            },
            "preLaunchTask": "npm: serve"
        }
    ],
    "compounds": [
        {
            "name": "Run both-ends",
            "configurations": ["Python: Django","vuejs: Chrome", ]
        }
    ],
}
alexreg commented 3 years ago

Per my issue concerning bash shells (#132312), I confirm this is still happening on the August stable release too.

rofrol commented 3 years ago

How to downgrade when using scoop https://github.com/lukesampson/scoop/issues/4345#issuecomment-913495438

mohammadmjn commented 3 years ago

I'm experiencing this annoying issue after updating to 1.60.0 stable release. I mean when I close VS Code and open it again, at startup it opens PowerShell every time even after choosing Git Bash as default terminal.

Version: 1.60.0 (system setup)
Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
Date: 2021-09-01T10:41:52.311Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 6.1.7601

And my setting.json is as follows:

"terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell"
    },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "args": [],
      "icon": "terminal-cmd"
    },
    "Git Bash": {
      "source": "Git Bash",
      "icon": "terminal-bash"
    },
  },
  "terminal.integrated.defaultProfile.windows": "Git Bash",
cdxn commented 3 years ago

can we get an easy update until this is fixed? update to not open an integrated terminal on start?

aleksandarbos commented 3 years ago

image

    "terminal.integrated.profiles.windows": {
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "Git Bash": {
            "source": "Git Bash"
        },
        "Cmder": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "env": {"CMDER_ROOT": "E:\\tools\\cmder"},
            "args": [
                "/K",
                "%CMDER_ROOT%\\vendor\\bin\\vscode_init.cmd"
            ],
            "icon": "cmder",
        }
    },
    "terminal.integrated.defaultProfile.windows": "Cmder",
Version: 1.60.0 (user setup)
Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
Date: 2021-09-01T10:41:52.311Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

https://youtu.be/_CL6n0FJZpk?t=21

IllusionMH commented 3 years ago

Should be already fixed in latest Insiders build Version: 1.61.0-insider (user setup) Commit: bb9491d9f2c65510226dcc920a6efbf6501d5943 Date: 2021-09-07T05:17:08.586Z

@jmanthony3 could you check Insiders build to see if it still preproduces for you?

dippas commented 3 years ago

Should be already fixed in latest Insiders build Version: 1.61.0-insider (user setup) Commit: bb9491d Date: 2021-09-07T05:17:08.586Z

@jmanthony3 could you check Insiders build to see if it still preproduces for you?

Fixed here