PowerShell / PowerShell/vscode-powershell
Debugging Remote Runspace: the editor could not be opened due to an unexpected error: cannot read properties of null (reading 'create')
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
I try to run a script with
wait-debugger; & MyCommand
(where & MyCommand stands in for some command), a tab opens in VS Code with a red circle with an X. It says, "the editor could not be opened due to an unexpected error: cannot read properties of null (reading 'create')" with a "Try Again" button.
I have seen this a few times recently. If I close and reopen VS Code (a frequent fix for when it bugs out), it still keeps doing that.
It looks like an error from VS Code, but it happens when I'm trying to run the debugger with Powershell; so, it probably makes most sense to post this here first.
PowerShell Version
Name Value
---- -----
PSVersion 7.4.7
PSEdition Core
GitCommitId 7.4.7
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
Name : Visual Studio Code Host
Version : 2025.0.0
InstanceId : c84edc60-e725-42a9-954c-cb01d1fea8ba
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
1.96.4
cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
x64
Extension Version
ms-vscode.powershell@2025.0.0
Steps to Reproduce
write command. Hit enter.
The call stack shows paused on step:
Visuals
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with wait-debugger; & MyCommand in the PowerShell debugger and inspect the reported paused call stack. Capture extension logs and compare the editor-opening path around the cannot read properties of null (reading 'create') error; done means the debug session opens its editor without the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100