Skip to content

Changing language type of pasted code in new file crashes pwsh terminal session #1702

@yobyot

Description

@yobyot

System Details

System Details Output

### VSCode extensions:
eamodio.gitlens@9.4.1
HookyQR.beautify@1.4.7
ms-vscode.PowerShell@1.10.2
robertohuertasm.vscode-icons@8.0.0
streetsidesoftware.code-spell-checker@1.6.10


### PSES version: 1.10.2.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      6.1.1
PSEdition                      Core
GitCommitId                    6.1.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

Changing language type of pasted code in new file crashes pwsh terminal session
To reproduce:

  1. Set default filetype to .ps1
  2. Open existing .ps1 containing JSON here-string.
  3. Copy and paste JSON to new file
  4. Change filetype of new file to JSON
  5. vs-code powershell crashes terminal

Expected Behaviour

Extension should not crash pwsh terminal session.

Actual Behaviour

Extension crashes pwsh terminal session.

Attached Logs

terminal

vscode-powershell-logs.zip

Follow the instructions in the troubleshooting docs
about capturing and sending logs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions