Skip to content

PowerShell Integrated Console prompt does not appear #2719

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
Liturgist opened this issue May 23, 2020 · 71 comments · Fixed by PowerShell/PowerShellEditorServices#1349
Closed
Labels

Comments

@Liturgist
Copy link

Liturgist commented May 23, 2020

PowerShell Integrated Console

After installing the Microsoft PowerShell Extension, it appears that I can choose a TERMINAL of "powershell" or "PowerShell Integrated Console."

The "powershell" TERMINAL appears to work as expected, but no debugging can be done.

"""Cannot debug or run a PowerShell script until the PowerShell session has started. Wait for the PowerShell session to finish starting and try again.
"""

The "PowerShell Integrated Console" TERMINAL does not. It appears hung. It accepts no keyboard entry.

This is based on a fresh install of VS Code from VSCodeUserSetup-x64-1.45.1.exe.

Version: 1.45.1 (user setup)
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:27:35.169Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363
PowerShell extension 2020.4.0
%USERPROFILE%\.vscode\extensions\ms-vscode.powershell-1.8.2\ms-vscode.powershell-1.8.2
    (PS: There is no "examples" subdirectory)
@ghost ghost added the Needs: Triage Maintainer attention needed! label May 23, 2020
@ninmonkey
Copy link

The debugger and extension are the 'integrated terminal' The other one is a regular shell.
It doesn't boot up instantly. Hit f5, it'll say it's loading, then you'll see it finish. Then hit f5 to use it. After the first load it stays loaded.

@Liturgist
Copy link
Author

When VS Code is first started, I get the Welcome doc and a regular shell PowerShell.

Pressing F5:

  • brings up the the "Select Environment" list,
  • starts a "PowerShell Integrated Console" terminal,
  • and displays "Starting PowerShell..." in yellow on the bottom status line.

The PowerShell Integrated Console terminal displays "=====> PowerShell Integrated Console <=====" and nothing else.

Clicking on "Starting PowerShell..." brings up a notification:

Running the contributed command:
'PowerShell.Show.SessionMenu' failed.

How can I tell which PowerShell executable is being used? I have two (2) in the PATH on my system.

C:>where powershell
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

C:>where pwsh
C:\Program Files\PowerShell\7.0.1\7\pwsh.exe

@Liturgist
Copy link
Author

It has been "Starting PowerShell..." for over thirty (30) minutes. What should I expect?

@TylerLeonhardt
Copy link
Member

Thanks for the info! Can you also attach the logs here so we can get a better idea of what's going on?

@TylerLeonhardt
Copy link
Member

Also is this machine locked down in any way?

@Liturgist
Copy link
Author

Liturgist commented May 24, 2020

Logs are attached from a recent run. I did not find any text about "error" or "fail" in them. The machine is not locked down in any way.

vscode-powershell.log
EditorServices.log
StartEditorServices.log

@y-halim
Copy link

y-halim commented May 26, 2020

I have the same issue with the same vesion of VS Code that I installed 3 days ago.

Version: 1.45.1 (user setup)
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:27:35.169Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362

vscode-powershell.log
EditorServices.log
StartEditorServices.log

@TylerLeonhardt
Copy link
Member

Does this machine use Avecto or BeyondSoft at all?

Is there any enforcement via Group Policy on this machine?

Is there any anti-virus on the machine?

Have you configured the machine in any bizarre ways... That might be non-traditional?

@TylerLeonhardt TylerLeonhardt added Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels May 26, 2020
@Liturgist
Copy link
Author

Does this machine use Avecto or BeyondSoft at all? No
Is there any enforcement via Group Policy on this machine? gpresult /Scope User /v does not report any
Is there any anti-virus on the machine? Yes, McAfee
Have you configured the machine in any bizarre ways... That might be non-traditional? No

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label May 26, 2020
@Liturgist
Copy link
Author

Requested Repro-Info provided.

@SydneyhSmith
Copy link
Collaborator

Thanks so much for all the information, we are still having some trouble diagnosing the crash...it would be really helpful if you could also attach the payloadlogs--instructions for how to do that are here

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label May 26, 2020
@Liturgist
Copy link
Author

Liturgist commented May 27, 2020

@SydneyhSmith - Please let me know if I can provide anything else. Thanks.

I would note that there is only "PowerShell Integrated Console" and no plain "powershell" terminal.

There is no "PowerShell Editor Services" item in the drop-down listbox. I chose "PowerShell Extension Logs."

5/26/2020 7:24:41 PM [NORMAL] - Visual Studio Code v1.45.1 64-bit
5/26/2020 7:24:41 PM [NORMAL] - PowerShell Extension v2020.4.0
5/26/2020 7:24:41 PM [NORMAL] - Operating System: Windows 64-bit
5/26/2020 7:24:41 PM [NORMAL] - Language server starting --
5/26/2020 7:24:41 PM [NORMAL] -     PowerShell executable: C:\Program Files\PowerShell\7\pwsh.exe
5/26/2020 7:24:41 PM [NORMAL] -     PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.4.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\logs\1590539081-e61e7b25-a838-4c9c-baf4-ba1792417ad11590539066624\EditorServices.log' -SessionDetailsPath 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\sessions\PSES-VSCode-18956-257991' -FeatureFlags @() 
5/26/2020 7:24:41 PM [NORMAL] -     PowerShell Editor Services args: Import-Module 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.4.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\logs\1590539081-e61e7b25-a838-4c9c-baf4-ba1792417ad11590539066624\EditorServices.log' -SessionDetailsPath 'c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\sessions\PSES-VSCode-18956-257991' -FeatureFlags @() 
5/26/2020 7:24:41 PM [NORMAL] - pwsh.exe started.
5/26/2020 7:24:41 PM [NORMAL] - Waiting for session file
5/26/2020 7:24:43 PM [NORMAL] - Session file found
5/26/2020 7:24:43 PM [NORMAL] - Registering terminal close callback
5/26/2020 7:24:43 PM [NORMAL] - Registering terminal PID log callback
5/26/2020 7:24:43 PM [NORMAL] - pwsh.exe PID: 4444
5/26/2020 7:24:43 PM [NORMAL] - Language server started.
5/26/2020 7:24:43 PM [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\\\.\\pipe\\PSES_sdyh4nmk.fh2","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\\\.\\pipe\\PSES_cc1qu3nv.wnp"}
5/26/2020 7:24:43 PM [NORMAL] - Connecting to language service on pipe \\.\pipe\PSES_sdyh4nmk.fh2...
5/26/2020 7:24:43 PM [NORMAL] - Language service connected.

Output from PowerShell Integrated Console

VERBOSE: Removing PSReadLine
VERBOSE: Adding AssemblyResolve event handler for new AssemblyLoadContext dependency loading
VERBOSE: Loading EditorServices
VERBOSE: 
== Build Details ==
- Editor Services version: 2.1.0
- Build origin:            Release
- Build time:              2020-04-15 21:53:56       

VERBOSE: 
== Host Startup Configuration Details ==
 - Host name:                 Visual Studio Code Host
 - Host version:              2020.4.0
 - Host profile ID:           Microsoft.VSCode       
 - PowerShell host type:      System.Management.Automation.Internal.Host.InternalHost

 - REPL setting:              PSReadLine
 - Session details path:      c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\sessions\PSES-VSCode-18956-257991
 - Bundled modules path:      c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\modules
 - Additional modules:        PowerShellEditorServices.VSCode
 - Feature flags:

 - Log path:                  c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\logs\1590539081-e61e7b25-a838-4c9c-baf4-ba1792417ad11590539066624\EditorServices.log
 - Minimum log level:         Verbose

 - Profile paths:
   + AllUsersAllHosts:       C:\Program Files\PowerShell\7\profile.ps1
   + AllUsersCurrentHost:    C:\Program Files\PowerShell\7\Microsoft.VSCode_profile.ps1
   + CurrentUserAllHosts:    C:\Users\pwatson\Documents\PowerShell\profile.ps1
   + CurrentUserCurrentHost: C:\Users\pwatson\Documents\PowerShell\Microsoft.VSCode_profile.ps1

VERBOSE: 
== Console Details ==
 - Console input encoding: OEM United States
 - Console output encoding: OEM United States
 - PowerShell output encoding: Unicode (UTF-8)

VERBOSE: 
== PowerShell Details ==
- PowerShell version: 7.0.0
- Language mode:      FullLanguage

VERBOSE: 
== Environment Details ==
 - OS description:  Microsoft Windows 10.0.18363
 - OS architecture: X64
 - Process bitness: 64

VERBOSE: Updated PSModulePath to: 'C:\Users\pwatson\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;c:\Users\pwatson\.vscode\extensions\ms-vscode.powershell-2020.4.0\modules'
VERBOSE: Loading PowerShell Editor Services
VERBOSE: Loading PSES DLL using new assembly load context
VERBOSE: Starting EditorServices
VERBOSE: Starting server, deregistering host logger and registering shutdown listener


                  =====> PowerShell Integrated Console <=====

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label May 27, 2020
@y-halim
Copy link

y-halim commented May 27, 2020

The problem disappeared after I restarted my computer.

@Liturgist
Copy link
Author

Liturgist commented May 27, 2020

I am glad it is working for you, @y-halin.

I have restarted my computer many times and it continues to fail in the same way.

@SydneyhSmith
Copy link
Collaborator

Thanks @Liturgist for the additional information, unfortunately your logs do not look quite as expected, would you mind sharing what settings you have enabled? Thanks again!

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label May 28, 2020
@Liturgist
Copy link
Author

Thanks @Liturgist for the additional information, unfortunately your logs do not look quite as expected, would you mind sharing what settings you have enabled? Thanks again!

@SydneyhSmith - I would be happy to share the settings. How do I generate a list of the settings? Is it a .json file? If so, where?

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label May 29, 2020
@TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label May 29, 2020
@Liturgist
Copy link
Author

Here is the content of "%APPDATA%\Code\User\settings.json". There are a few .json files under "%USERPROFILE%.vscode", but the all appear to be related to azure or Plaster.

C:>type "%APPDATA%\Code\User\settings.json"
{
    "window.zoomLevel": 2
    ,"terminal.integrated.shell.windows":
        "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
    "workbench.activityBar.visible": true,
    "powershell.developer.powerShellExeIsWindowsDevBuild": true,
    "team.showWelcomeMessage": false,
    "[powershell]": {},
    "files.associations": {
        "*.ps1": "powershell"
    },
    "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationAfterEveryPipeline",
    "powershell.developer.editorServicesLogLevel": "Verbose"
}

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label May 29, 2020
@TylerLeonhardt
Copy link
Member

@Liturgist if you remove these settings:

    "powershell.developer.powerShellExeIsWindowsDevBuild": true,
    "[powershell]": {},
    "powershell.developer.editorServicesLogLevel": "Verbose"

does that help at all?

@TylerLeonhardt
Copy link
Member

If not, can you add:

"powershell.developer.editorServicesLogLevel": "Diagnostic"

and give us the logs?

@MoonRaker58
Copy link

@rjmholt I get a not authorized error with that build. I did try preview v2020.7.0 and it works so I'm going to use that one for a while. Thanks for the work.

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

@rjmholt I get a not authorized error with that build. I did try preview v2020.7.0 and it works so I'm going to use that one for a while. Thanks for the work.

Same on both counts. Couldn't access the linked build, but the preview v2020.7.0 build of the extension worked.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Aug 13, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Aug 13, 2020
@devedse
Copy link

devedse commented Aug 13, 2020

@rjmholt it seems normal people 😄 don't have access the link you posted:

{"$id":"1","innerException":null,"message":"TF400813: The user 'Windows Live ID\..........@........' is not authorized to access this resource.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Aug 13, 2020
@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Aug 13, 2020

Here's the file:

PowerShell-insiders.vsix.zip

Sorry about that...

code --install-extension /full/path/to/PowerShell-insiders.vsix

make sure you have the normal PowerShell extension disabled.

@devedse
Copy link

devedse commented Sep 1, 2020

@TylerLeonhardt , I verified that this fixes the issue, thanks :)

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 1, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 1, 2020
@DeanGross
Copy link

2020.6.0 gave me this problem, i unistalled that and then installed 2020.7.0 and the problem still exists.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 4, 2020
@corbob
Copy link
Contributor

corbob commented Sep 4, 2020

Here's the file:

PowerShell-insiders.vsix.zip

Sorry about that...

code --install-extension /full/path/to/PowerShell-insiders.vsix

make sure you have the normal PowerShell extension disabled.

@DeanGross you'll want to use the file Tyler mentioned here. This issue will be resolved in the published release once a new release is pushed.

@DeanGross
Copy link

@corbob thanks, I have installed v2020.8.0-CI.60063 and still have the problem. I have Windows 10, 1809 OS 17763.1339 if that matters

@corbob
Copy link
Contributor

corbob commented Sep 11, 2020

@DeanGross If you're still having the issue, and the CI build didn't solve it, I'd suggest opening a new issue and if possible attach the logs. It sounds like you might be seeing a different issue than originally reported in this issue.

@DeanGross
Copy link

@corbob i updated VSC to 1.49 and 2020.8.0-CI.60063 seems to be working properly now

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 24, 2020
@AyJizzy
Copy link

AyJizzy commented Dec 30, 2020

For windows users, when reinstalling vscode I noticed inside properties of the application that 'compatibility mode' was turned on to be be ran with settings for windows 8. Once I removed that it fixed my issue with a restart of the application.

@kaovilai
Copy link

kaovilai commented Mar 14, 2021

I had problems after restarting VSCode many times with PowerShell extension v2021.2.2 installed.
The problem went away as of now by restarting Powershell session without restarting VSCode

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

Successfully merging a pull request may close this issue.