Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VsCode 1.56 - When start debuging, Windows Powershell terminal is opened instead of Git Bash #123163

Closed
ymouhat opened this issue May 6, 2021 · 5 comments · Fixed by #123729
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes terminal Integrated terminal issues terminal-profiles verified Verification succeeded
Milestone

Comments

@ymouhat
Copy link

ymouhat commented May 6, 2021

  • VS Code Version: 1.56.0
  • OS Version: Windows 10

Steps to Reproduce:

1.Open Visual Studio code
2. Do CTRL + SHIFT + P , and select "Terminal: Select Default Profile".
3. Select Git Bash.
4. Close all the terminal.
5. On the main menu, click Terminal > New Terminal ( a bash Terminal is opened ok)
6. Click Run > Start debuging , the terminal switch to powershell

The only workaround is to keep using the following information in the user setting.json files
"terminal.integrated.shell.windows": "C:\Program Files\Git\bin\bash.exe",
But it is mentioned as deprecated

If I use the following setting , the same problems occurs ( windows powershell terminal opens instead of git bash)

   "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": {
            "path": [
                "C:\\Program Files\\Git\\bin\\bash.exe",
            ],
            "source": "Git Bash",
            "icon": "terminal-bash"
        },
        "Windows PowerShell": {
            "path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
        }
    },

Thanks in advance

Does this issue occur when all extensions are disabled?: Yes

@isidorn isidorn assigned weinand and Tyriar and unassigned isidorn May 6, 2021
@microsoft microsoft deleted a comment from vscodebot bot May 6, 2021
@Tyriar
Copy link
Member

Tyriar commented May 6, 2021

I think this is happening because debug depends on ExtHostTerminalService.getDefaultShell which uses a deprecated method to fetch the default shell that does not support the defaultProfile setting. We're switching the default back so shell/shellArgs take priority over defaultProfile in #123174. I'd recommend sticking with terminal.integrated.shell.windows for now until this issue is handled.

@Tyriar Tyriar assigned meganrogge and unassigned weinand May 6, 2021
@Tyriar Tyriar added this to the May 2021 milestone May 6, 2021
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues terminal-profiles labels May 6, 2021
@ymouhat
Copy link
Author

ymouhat commented May 7, 2021

Ok thanks @Tyriar for your quick answer.

@dweil
Copy link

dweil commented May 7, 2021

Blocking issue for me, powershell is opened instead of cmd.exe

@Tyriar Tyriar added the on-release-notes Issue/pull request mentioned in release notes label Jun 3, 2021
@rzhao271 rzhao271 added verified Verification succeeded and removed verified Verification succeeded labels Jun 4, 2021
@meganrogge
Copy link
Contributor

@rzhao271 what happened here? should this have verification-found?

@rzhao271
Copy link
Contributor

rzhao271 commented Jun 7, 2021

I was unable to reproduce the original issue in 1.56.2, but I did manage to notice a difference in behaviour for #124886, a potential duplicate. I'll mark this issue verified.

@rzhao271 rzhao271 added the verified Verification succeeded label Jun 7, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes terminal Integrated terminal issues terminal-profiles verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants
@weinand @isidorn @Tyriar @dweil @rzhao271 @ymouhat @meganrogge and others