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

Powershell console opens every time I launch VS Code with a project #132150

Closed
markdall opened this issue Sep 2, 2021 · 51 comments · Fixed by #132172
Closed

Powershell console opens every time I launch VS Code with a project #132150

markdall opened this issue Sep 2, 2021 · 51 comments · Fixed by #132172
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release insiders-released Patch has been released in VS Code Insiders terminal-profiles verified Verification succeeded

Comments

@markdall
Copy link

markdall commented Sep 2, 2021

Issue Type: Bug

  1. Update to the latest VS Code.
  2. Right click VS Code icon on task bar and choose a project to load that doesn't use powershell.

Expected result: Your project loads.
Actual result: Your project loads and the powershell console window opens, exhorting you to try the new cross-platform Powershell.

Alternate repro steps:

  1. Navigate in the cmd.exe prompt to a project which contains no powershell code.
  2. Execute code -n .

Expected result: Your project loads.
Actual result: Your project loads and the powershell console window opens, exhorting you to try the new cross-platform Powershell.

VS Code version: Code 1.60.0 (e7d7e9a, 2021-09-01T10:41:52.311Z)
OS version: Windows_NT x64 10.0.21390
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 x 3600)
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) 31.92GB (20.40GB free)
Process Argv --file-uri file:///f%3A/wowbackups/elvui.code-workspace --crash-reporter-id 32772866-2d76-498c-8293-b5f51b9b73de
Screen Reader no
VM 0%
Extensions (49)
Extension Author (truncated) Version
vscode-database baj 2.2.3
exuberant-ctags chr 0.0.12
coddx-alpha cod 0.3.1
bracket-pair-colorizer Coe 1.0.61
supersharp cra 0.1.4
vscode-markdownlint Dav 0.43.2
githistory don 0.6.18
python-extension-pack don 1.6.0
xml Dot 2.5.1
gitlens eam 11.6.0
vscode-drawio eig 1.0.3
git-project-manager fel 1.7.1
vscode-pull-request-github Git 0.30.0
language-cython guy 0.0.6
vscode-test-explorer hbe 2.21.1
vscode-drawio hed 1.6.2
beautify Hoo 1.5.0
mysql-syntax jak 1.3.1
sharppad jma 1.1.0
vscodeilviewer jos 0.0.1
restructuredtext lex 162.0.0
vscode-python-test-adapter lit 0.7.0
MagicPython mag 1.1.0
vscode-docker ms- 1.16.1
csharp ms- 1.23.15
vscode-kubernetes-tools ms- 1.3.3
mssql ms- 1.10.1
python ms- 2021.9.1191016588
vscode-pylance ms- 2021.9.0
jupyter ms- 2021.8.2031190714
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.194.0
remote-ssh ms- 0.65.7
remote-ssh-edit ms- 0.65.7
remote-wsl ms- 0.58.2
vscode-remote-extensionpack ms- 0.21.0
cpptools ms- 1.6.0
powershell ms- 2021.8.2
test-adapter-converter ms- 0.1.2
neuron-IPE neu 1.0.4
autodocstring njp 0.5.4
errorlens Phi 1.1.3
platformio-ide pla 2.3.3
vscode-commons red 0.0.6
vscode-yaml red 0.22.0
cython tcw 0.1.0
vscodeintellicode Vis 1.2.14
vscode-todo-highlight way 1.0.4
material-theme zhu 3.11.4
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627cf:30244335
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
vsccppwtct:30329789
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30360495
bridge0723:30353136
vsdyn321cf:30356811
vscus224cf:30358040

@deqyra
Copy link

deqyra commented Sep 2, 2021

Can confirm that this is happening to me as well. This is despite having the following in my config:

    "terminal.integrated.profiles.windows":{
        "Git Bash": {
            "path": "C:/Program Files/Git/git-bash.exe"
        }
    },
    "terminal.integrated.defaultProfile.windows": "Git Bash"

All my tasks also now run in powershell and I can't seem to have them run in any other shell. Definitely not a critical issue (in my case at least) but quite annoying. :)

@ALee-DF
Copy link

ALee-DF commented Sep 2, 2021

Same thing is happening to me since the latest update in #132170

I can still switch terminals, but it's definitely an annoying qualilty of life bug.

@meganrogge
Copy link
Contributor

Any errors in dev tools?

@ALee-DF
Copy link

ALee-DF commented Sep 2, 2021

I get this error on start up. Not sure if it's relevant though.
devtool_bug

I get no errors when switching terminals or assigning a default terminal.

@SamuelQuinones
Copy link

+1 Was going to make an issue about this, ever since the update to 1.60 no matter how I configure the settings, it will always launch powershell,

I tried nulling out the other profiles like the documentation says but to no avail:

{
  "terminal.integrated.profiles.windows": {
    "Git Bash": null
  }
}

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal-profiles labels Sep 2, 2021
meganrogge added a commit that referenced this issue Sep 2, 2021
@Tyriar
Copy link
Member

Tyriar commented Sep 13, 2021

FYI to the conspiracy theorists, if we wanted to sneakily push powershell, introducing an annoying bug probably wouldn't be the way to do it. Ways we help powershell are by improving the product, not making it worse, eg:

  • Collaborate on the extension API with the pwsh team
  • Improve the pwsh experience by adding things like custom keybindings when the shell is detected as powershell
  • Switched the default fallback on Windows from cmd to pwsh (this bug was caused because we couldn't find the right profile so it reverted to the fallback).

We would do the same for any shell though, I use bash primarily myself.

@0xJonasDev
Copy link

Just checking in for an update, no pressure. Has this patch been pushed yet or pending?

@Tyriar
Copy link
Member

Tyriar commented Sep 14, 2021

Release will likely happen tomorrow, got delayed to push some other fixes in. We'll update #132426 as we're releasing.

@tomshaffner
Copy link

tomshaffner commented Sep 14, 2021 via email

@andrewkrippner
Copy link

I just received the update and it is working properly for me now!

@marcinkubica
Copy link

marcinkubica commented Sep 15, 2021

I'm still getting powershell terminal open itself when opening vscode and some .ps1 files from last session

@Tyriar
Copy link
Member

Tyriar commented Sep 15, 2021

and some .ps1 files from last session

@marcinkubica do you have the powershell extension installed? If not please create a new issue with more details as this one is definitely fixed.

@marcinkubica
Copy link

and some .ps1 files from last session

@marcinkubica do you have the powershell extension installed? If not please create a new issue with more details as this one is definitely fixed.

Hi, I do have PowerShell extension installed.

@Tyriar
Copy link
Member

Tyriar commented Sep 15, 2021

@marcinkubica oh ok, well it opens its own terminal when you open a ps1 file

@ramiro-e
Copy link

I just got the 1.60.1 update and it has been fixed

@WORMSS
Copy link

WORMSS commented Sep 21, 2021

Confirmed 1.60.1 fixed this for me. (Though, I had to re-set my default)

@mahendra2448
Copy link

just add this to the settings.json , hope this helps someone

{
    "terminal.integrated.profiles.windows": {
        "Cmder": {
            "path": "C:\\Windows\\System32\\cmd.exe",
            "args": [
                "/K",
                "C:\\cmder\\vendor\\bin\\vscode_init.cmd"
            ]
        }
    },
    "terminal.integrated.defaultProfile.windows": "Cmder",
    "terminal.external.windowsExec": "C:\\cmder\\Cmder.exe",
}

@pebeid
Copy link

pebeid commented Sep 29, 2021

Hello
This is still an issue for me even with version 1.16.2

image
image

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 candidate Issue identified as probable candidate for fixing in the next release insiders-released Patch has been released in VS Code Insiders terminal-profiles verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.