vscode-powershell: Script output does not get written to the debug console
System Details
- Operating system name and version:
- VS Code version: 1.4.0
- PowerShell extension version: 0.7.2
- Output from
$PSVersionTable:
PS C:\Users\TrevorSullivan> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.14393.103
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.103
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
Sometimes I run a PowerShell script, and the Debug Console shows nothing.
Sometimes I run a PowerShell script, and the Debug Console shows output, but not Error stream output.
Sometimes I run a PowerShell script and the Debug Console shows output from the Output and Error streams, as expected.
This happens with both VSCode and VSCode Insiders (as of today’s release).
Reproduction Steps
Inconsistent results.
Cheers, Trevor Sullivan Docker Captain Microsoft MVP: Cloud & Data Center Management https://trevorsullivan.net https://twitter.com/pcgeek86
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 37 (14 by maintainers)
OK, here’s a preview package. Ignore the version number here, I’m using an arbitrarily increased version just for the purpose of sending out a preview. Also, just to be clear, USE AT YOUR OWN RISK. This build was created on my dev machine as a convenience for you guys so make sure you do the proper virus scanning, etc before you use it.
Download here: PowerShell-0.7.10.zip IMPORTANT: After downloading this file, rename the extension from
.zipto.vsix!To install the preview, go into VS Code and run the
Extensions: Install from VSIX...command then select the VSIX file that you downloaded and renamed. The extension should install, click the ‘Reload’ button afterward so that VS Code gets restarted. At this point you should be able to run a short script with output statements as you would expect.This build should be stable enough to use until 0.8.0 gets released next week, but definitely file issues if you find any problems.
Yep! I’ve made huge progress with moving everything to a new model where all console activity happens directly in the real PowerShell console running in the integrated terminal. I think I’ll have a new update ready in a couple weeks.
I’m really sorry this issue has been causing your trouble, soon you won’t have to deal with it anymore 😃
I’m working in it this week to be included with 0.8.0. Will keep you posted!
Problem’s still there with VSCode 1.7.1 (upgraded today) with version 0.7.2 of the extension…
Back to ISE for now 😉
I’ve got a fix for this, it’ll definitely be in 0.8.0: https://github.com/PowerShell/PowerShellEditorServices/pull/306