Repository navigation
Description
Issue Type: Bug
I am experiencing a problem with VS Code hanging when opening a specific PowerShell file. I think the problem is with the Powershell Language Basics extension, not the Powershell extension, which is why I'm posting here.
When opening the specific script VS Code will hang and eventually I'll receive a prompt saying "The window is no longer responding" and I'm given the option to Reopen, Keep Waiting, or Close.
Reopening the window results in the same behaviour.
Keep Waiting results the same behaviour, though I only clicked it 5-6 times before giving up.
Closing the window works correctly.
If I disable the PowerShell extension and Powershell Language Basics extension, the file loads properly.
If I then re-enable the PowerShell extension and reload, VS Code hangs again.
If I disable the PowerShell extension but leave the Powershell Language Basics extension enabled, the file fails to load.
I can open any other PowerShell file with both extensions enabled, it's just the one file that causes problems. It's 29 KB and ~700 lines. I've tried on two different machines running the same version of Windows, VS Code, and the extensions with no difference in behaviour.
No logs are created in the .vscode\extensions\ms-vscode.powershell-1.8.2\logs folder when this error occurs.
VS Code version: Code 1.26.0 (4e93618, 2018-08-13T16:29:31.933Z)
This was also attempted on 1.27.0-insider with the same results
OS version: Windows_NT x64 10.0.17134
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200) |
| GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software rasterization: enabled video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
| Memory (System) | 31.96GB (22.16GB free) |
| Process Argv | removed by reporter |
| Screen Reader | no |
| VM | 0% |
Extensions (2)
| Extension | Author (truncated) | Version |
|---|---|---|
| PowerShell | ms- | 1.8.2 |
| vscode-autohotkey | sle | 0.2.2 |
Activity
vscodebot commentedon Aug 15, 2018
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
sandy081 commentedon Aug 15, 2018
Could be duplicate of #56368. Issue has the file with which code crashes
Mibz commentedon Aug 15, 2018
Can confirm my behaviour seems identical. I pasted the file from that issue into VS Code without a problem, but once I saved it as .ps1 VS Code hung as it does with my script.
EDIT: I should note that my file is in source control but the fault occurs without using the Source Control window, and without making any changes to the file.
aeschli commentedon Aug 15, 2018
I reverted the grammar to PowerShell/EditorSyntax@6f54386
where this this file does no longer crash.
VS Code Hangs When Opening Specific PowerShell File. Fixes #56430