System Details Output
### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
### 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
Changing language type of pasted code in new file crashes pwsh terminal session
To reproduce:
Extension should not crash pwsh terminal session.
Extension crashes pwsh terminal session.

Follow the instructions in the troubleshooting docs
about capturing and sending logs.
This looks like it might be https://github.com/PowerShell/vscode-powershell/issues/1649.
Is your default file type set to PowerShell? If so, does commenting out that setting fix the problem?
Nice catch, @rjmholt.
Yes, default type is set to ‘powershell’ Vscode is an ISE replacement for me so it’s more convenient to set the default type to .ps1.
I’ll try changing the default to something else.
Removing 'powershell' from the files.defaultLanguage setting stops the terminal from crashing, so the problem is likely a dup of #1649.
@yobyot thanks for checking that! I will close this issue for now as a dup of #1649 but please let us know if you start running into this issue again