Skip to content

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

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

Closed
yobyot opened this issue Jan 17, 2019 · 4 comments
Closed
Labels
Issue-Bug A bug to squash. Issue-Performance Something's slow.

Comments

@yobyot
Copy link

yobyot commented Jan 17, 2019

System Details

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

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.

@SydneyhSmith SydneyhSmith added Issue-Bug A bug to squash. Issue-Performance Something's slow. Triage and removed Issue-Bug A bug to squash. Issue-Performance Something's slow. labels Jan 17, 2019
@rjmholt
Copy link
Contributor

rjmholt commented Jan 17, 2019

This looks like it might be #1649.

Is your default file type set to PowerShell? If so, does commenting out that setting fix the problem?

@yobyot
Copy link
Author

yobyot commented Jan 17, 2019

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.

@yobyot
Copy link
Author

yobyot commented Jan 18, 2019

Removing 'powershell' from the files.defaultLanguage setting stops the terminal from crashing, so the problem is likely a dup of #1649.

@SydneyhSmith
Copy link
Collaborator

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Issue-Performance Something's slow.
Projects
None yet
Development

No branches or pull requests

3 participants