Skip to content

Debug Launch with createTemporaryIntegratedConsole does not switch to [TEMP] Powershell Extension Tab #4201

Closed
@Hetshu

Description

@Hetshu

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

When launching the current powershell file editor tab with F5 or Ctrl+F5 with a launch setting that includes createTemporaryIntegratedConsole : true, then in the preview extension the terminal tab [TEMP] Powershell Extension will be (re-)created, but it will not be switched to. Instead the persistent terminal tab Powershell Extension is shown.

This behavior is erroneous and super irritating, as you may think the script wasn't started at all.

In the released powershell extension the '[TEMP]Powershell Extension' tab is shown instead

PowerShell Version

(Powershell Version does not matter, same error with winps 5.1)
Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
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

Visual Studio Code Version

1.72.0
64bbfbf67ada9953918d72e1df2f4d8e537d340e
x64

Extension Version

[email protected]  => OK Version
[email protected] =>   Version the with error described above
[email protected]

Steps to Reproduce

Start a powershell script with F5 or Ctrl+F5

with this launch config

{
            "name": "PS: Current File in Temporary Console",
            "type": "PowerShell",
            "request": "launch",
            "script": "${file}",
            "args": [],
            "cwd": "${file}",
            "createTemporaryIntegratedConsole": true
        },

Watch what Terminal tab is active.

The [TEMP] Powershell Extension tab should be active in the terminan pane, but it is not.

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions