Vscode-powershell: Debug hangs immediately on powershell script

Created on 8 Feb 2017  路  4Comments  路  Source: PowerShell/vscode-powershell

_From @ssaari on February 7, 2017 0:20_

  • VSCode Version: Code 1.9.0 (27240e71ef390bf2d66307e677c2a333cebf75af, 2017-02-02T08:31:00.827Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions:

|Extension|Author|Version|
|---|---|---|
|mssql|ms-mssql|0.2.0|
|csharp|ms-vscode|1.6.2|
|PowerShell|ms-vscode|0.7.10|


After updating to v1.9.0, no scripts run, either in single file or normal debug sessions. The progress bar runs until I cancel it (requires two clicks on the cancel button), but no output occurs to the debug console. Tried it on two computers.
Steps to Reproduce:

  1. Create a new powershell script. Folder can be open or not. Debug clicked or not.
  2. Type Write-Host 'Test'
  3. Press F5 or click the Run icon. No output displays. Script never completes.

_Copied from original issue: Microsoft/vscode#20091_

All 4 comments

Does the latest version of PowerShell extension 0.9.0 work any better? Note that 0.9.0 is the first version to support single file (no-workspace) debugging. Also, was the PowerShell script saved to disk? That's still a requirement even in 0.9.0.

@ssaari It looks like you have the "preview" version 0.7.10 installed, I believe this is the one with the (failed) preview of interactive console support. This version already has issues with debugging so I'd recommend against using it.

Also, due to an issue with VS Code, you will not see update notifications for the PowerShell extension since you've installed a preview release of the extension. You'll need to uninstall the PowerShell extension and then install the new 0.90 release using the Extensions UI. I would definitely recommend updating to see if the issue is resolved for you. Let us know if it helps.

If you're using this old release because you want the interactive console, you'll be happy to know that the 0.10.0 update which has the official implementation of that feature will be released within the next couple of weeks!

Yes, installing 0.90 fixed it. Thanks, @daviwil and @rkeithhill!

Glad to hear it, thanks for confirming!

Was this page helpful?
0 / 5 - 0 ratings