question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timed out waiting for the PowerShell extension to start when Start debugging before extension starts

See original GitHub issue

System Details

  • Operating System Windows 10
  • VS Code version 1.40.2
  • PowerShell extension version 2019.11.0
  • Output from $PSVersionTable 7.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:open
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
TylerLeonhardtcommented, Apr 30, 2020

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.

1reaction
virovets64commented, Apr 29, 2020

I have the same problem with v2020.4.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found