Skip to content

PowerShell session crashes when ANSI escape codes are used #2176

Closed
@pcgeek86

Description

@pcgeek86

Issue Description

I'm trying to use ANSI escape codes in Visual Studio Code, and experiencing frequent crashes of the extension.

Write-Host -Object "$([char]27)c"
Write-Host -Object "$([char]27)invalid"

After running this 5 - 10 times, the PowerShell extension eventually crashes and requires me to manually restart it. So far, I have only tested this on the system configuration included in this bug report.

Attached Logs

Follow the instructions in the README about
capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Darwin x64 18.7.0
VSCode 1.38.0
PowerShell Extension Version 2019.5.0

PowerShell Information

Name Value
PSVersion 6.2.2
PSEdition Core
GitCommitId 6.2.2
OS Darwin 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019, root:xnu-4903.271.2~2/RELEASE_X86_64
Platform Unix
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.2.2
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
LiveServer ritwickdey 5.6.1
one-monokai azemoh 0.3.7
powershell ms-vscode 2019.5.0
python ms-python 2019.9.34911
remote-containers ms-vscode-remote 0.74.0
vscode-ansible vscoss 0.5.2
vscode-icons vscode-icons-team 9.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions