Skip to content

cannot debug or run a powershell script until the powershell session has started #2897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Anitalex opened this issue Aug 19, 2020 · 5 comments

Comments

@Anitalex
Copy link

Issue Type: Bug

I have it set to only open pwsh on open. I have pwsh set as the default. I open vscode and I get this error....cannot debug or run a powershell script until the powershell session has started

Here are the extension logs..,

8/18/2020 11:53:39 PM [NORMAL] - Visual Studio Code v1.48.0 64-bit
8/18/2020 11:53:39 PM [NORMAL] - PowerShell Extension v2020.6.0
8/18/2020 11:53:39 PM [NORMAL] - Operating System: Windows 64-bit
8/18/2020 11:53:39 PM [NORMAL] - Language server starting --
8/18/2020 11:53:39 PM [NORMAL] - PowerShell executable: C:\Program Files\PowerShell\7\pwsh.exe
8/18/2020 11:53:39 PM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1597809219-8cf501e6-916a-487a-9e7c-41833a715ed41597809184330\EditorServices.log' -SessionDetailsPath 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-25052-323427' -FeatureFlags @()
8/18/2020 11:53:39 PM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1597809219-8cf501e6-916a-487a-9e7c-41833a715ed41597809184330\EditorServices.log' -SessionDetailsPath 'c:\Users\me.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-25052-323427' -FeatureFlags @()
8/18/2020 11:53:39 PM [NORMAL] - pwsh.exe started.
8/18/2020 11:53:39 PM [NORMAL] - Waiting for session file
8/18/2020 11:53:41 PM [NORMAL] - Session file found
8/18/2020 11:53:41 PM [NORMAL] - Registering terminal close callback
8/18/2020 11:53:41 PM [NORMAL] - Registering terminal PID log callback
8/18/2020 11:53:41 PM [NORMAL] - pwsh.exe PID: 20656
8/18/2020 11:53:41 PM [NORMAL] - Language server started.
8/18/2020 11:53:41 PM [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\.\pipe\PSES_s5timqdu.hbx","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\.\pipe\PSES_qxbnizbo.2ft"}
8/18/2020 11:53:41 PM [NORMAL] - Connecting to language service on pipe \.\pipe\PSES_s5timqdu.hbx...
8/18/2020 11:53:41 PM [NORMAL] - Language service connected.

$psversiontable

Name Value


PSVersion 7.0.3
PSEdition Core
GitCommitId 7.0.3
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

code --version

1.48.0
db40434f562994116e5b21c24015a2e40b2504e6
x64

code --list-extensions --show-versions

ms-azuretools.vscode-azurefunctions@0.23.0
ms-dotnettools.csharp@1.23.0
ms-dotnettools.vscode-dotnet-runtime@0.1.2
ms-python.python@2020.8.101144
ms-vscode.azure-account@0.9.2
ms-vscode.powershell@2020.6.0
ms-vscode.powershell-preview@2020.7.0
ms-vsts.team@1.161.0
msazurermtools.azurerm-vscode-tools@0.12.0

Extension version: 2020.6.0
VS Code version: Code 1.48.0 (db40434f562994116e5b21c24015a2e40b2504e6, 2020-08-13T07:50:42.600Z)
OS version: Windows_NT x64 10.0.19041

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz (4 x 2208)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.91GB (5.96GB free)
Process Argv
Screen Reader no
VM 0%
@ghost ghost added the Needs: Triage Maintainer attention needed! label Aug 19, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @Anitalex looks like a start-up issues, and potentially a dupe of #2719 in that issue we have provided a build of the extension which resolves this issue--would you mind giving that a try and letting us know if the issue persists? Thanks!

@SydneyhSmith SydneyhSmith added Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels Aug 20, 2020
@Anitalex
Copy link
Author

It seems to be working fine today with no modifications. After I sent this I did go through and removed every extension and then removed vscode. I removed every other app I had related to coding and then deleted the folders from APPDATA, Program Files and Programdata. I then reinstalled. I did notice something in the #2719 that you referenced and I was doing. I thought Powershell Integrated Console was the Windows Powershell but it is mentioned in your link that it is not. Thanks for that.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Aug 20, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Aug 21, 2020

I thought Powershell Integrated Console was the Windows Powershell but it is mentioned in your link that it is not

It can be. The extension will run off which PowerShell executable it's configured to. It will pick up installations in the default places and you can select those by clicking on the little PowerShell version symbol in the lower right-hand corner. That includes Windows PowerShell 5.1 and PowerShell 7. You can also configure your own with the "powershell.additionalPowerShellExePaths" setting.

@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Aug 21, 2020
@ghost
Copy link

ghost commented Jan 13, 2022

This is still an ongoing bug. Hoping that the VS Code developers will take this seriously because the program is buggy enough as it is.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jan 13, 2022
@ghost
Copy link

ghost commented Jan 13, 2022

Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead.

@andyleejordan andyleejordan removed the Needs: Maintainer Attention Maintainer attention needed! label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants