Timed out waiting for the PowerShell extension to start when Start debugging before extension starts
See original GitHub issueSystem Details
- Operating System Windows 10
- VS Code version 1.40.2
- PowerShell extension version 2019.11.0
- Output from
$PSVersionTable7.0.0-preview.6 5.1.18362.145
Issue Description
I am experiencing a problem with running a PowerShell debug configuration. “PowerShell: Launch a Script” If I do not open a ps1 file first the debugger will time out waiting for PowerShell to start. Error: Timed out waiting for the PowerShell extension to start.
Repro Instructions
Open VSCode Open a Folder with a launch.json and a PowerShell Script Note: DO NOT open any POWERSHELL scripts Open the debugger Control + Shift + D Launch a configuration PowerShell Launch a script.
Expected Behaviour
The Launch should Run
Actual Behaviour
Error: Timed out waiting for the PowerShell extension to start.
Work around
Open a PowerShell script in the editor Extension starts PowerShell Run the debug configuration. It will now work.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Cannot debug PowerShell scripts in Visual Studio Code
I get the following error message: Cannot debug or run a PowerShell script until the PowerShell session has started. Wait for the PowerShell...
Read more >Debug Node.js Apps using Visual Studio Code
The Visual Studio Code editor includes Node.js debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >Debugging PowerShell Scripts in Visual Studio Code - YouTube
In this video, I show how to use the PowerShell Extension for Visual Studio Code to debug PowerShell scripts. We'll look at how...
Read more >Custom Script Extension for Windows - Azure - Microsoft Learn
Don't run a script that will cause a stop or update of the VM agent. It might leave the extension in a transitioning...
Read more >Advanced Visual Studio Code for Python Developers
If you're just getting started with VS Code, you might want to check out Jon ... this extension, open up a Python file...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have a partial fix to this… pressing play with start the extension now, but it’ll say you need to wait for it to finish starting.
At least it’s two clicks of the same button, rather than opening a PS file.
I have the same problem with v2020.4.0