Skip to content

PowerShell Integrated Console starts when opening first PowerShell script #1169

@atkinsroy

Description

@atkinsroy

System Details

  • Operating system name and version: Windows 10 Version 1607, Build 14393.2007
  • VS Code version: 1.19.2
  • PowerShell extension version: 1.5.1
  • Output from $PSVersionTable:

ms-python.python@0.9.1
ms-vscode.PowerShell@1.5.1
robertohuertasm.vscode-icons@7.19.0
Tyriar.shell-launcher@0.1.6
zhuangtongfa.Material-theme@2.12.2

PSVersion 5.1.14393.1944
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.1944
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

I also have PowerShell Core, but this is not related, as I saw the same behaviour before installing this:

PSVersion 6.0.0
PSEdition Core
GitCommitId v6.0.0
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Note, I also had this problem before installing the shell launcher extension, as detailed above.

Issue Description

PowerShell Integrated Console automatically starts when opening first PowerShell script in session.

On my system, the PowerShell extension will open a console called "PowerShell Integrated Console" and switch to it when I open my first PowerShell script in the session. It does this even if I have another PowerShell console running. If I open VS Code and in the previous session I had a PowerShell script open, then the extension does the same thing (the console might be displayed or might be hidden).

I really don't like this behaviour - this console (labelled "PowerShell Integrated Console") behaves differently to other PowerShell consoles (e.g. it doesn't appear to run my profile, you cannot exit it and syntax colouring doesn't work).

I've improved things by using the following user setting; at least now when the console is created, I don't get switched, so its easier to ignore, but it still appears in my console list.
"powershell.integratedConsole.showOnStartup": false,

I'd really like a way to stop this console from starting. If I press ctrl ` I get a correctly behaving PowerShell console (labelled "powershell") and the same thing if the console window opens from last session. Can I suggest:
"powershell.integratedConsole.showOnFileOpen"

Attached Logs

vscode.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions