Skip to content

Autocomplete hung or not work at all after using function in VScode (powershell ext) #2642

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
mariomarinov4 opened this issue Apr 18, 2020 · 4 comments

Comments

@mariomarinov4
Copy link

mariomarinov4 commented Apr 18, 2020

Issue Description
Autocomplete hung in Editor or not work at all after using function.

I am experiencing a problem with Intellisense autocomplete. Open a new fresh PS integrated console and as soon as enter the following text (function) in editor and press Tab, the autocomplete works, but after a few seconds report 4 problems without any interaction from my side. Please see screenshot below.

Missing closing '}' in statement block or type definition.
Missing ')' in function parameter list.
Unexpected token ')' in expression or statement.
Unexpected token '}' in expression or statement.

I have deleted all text in Editor and try another command like Get-AdUser, but autocomplete is not working anymore. It's simply says "Loading". Even if I try to close the current editor tab and open a new one it's still not working. It doesn't matter what I do, the 4 problems hung there. If I clear all text in editor and wait for some time, a few minutes the problems are gone and autocomplete working again, but it's very annoying to wait for this to fix itself. The only solution is to reload the window or restart the ps session.

Attached Logs

image
image

Environment Information
Windows 10 1909

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.18363
VSCode 1.44.2
PowerShell Extension Version 2020.4.0

PowerShell Information

Name Value
PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 6.1.0 6.2.0 7.0.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
night-owl sdras 1.1.3
powershell ms-vscode 2020.4.0
shell-launcher Tyriar 0.4.1
vscode-icons vscode-icons-team 10.1.1
@ghost ghost added the Needs: Triage Maintainer attention needed! label Apr 18, 2020
@PrzemyslawKlys
Copy link
Contributor

Probably related: #2627

@mariomarinov4
Copy link
Author

Probably related: #2627
Hi @PrzemyslawKlys , thanks for your reply. Actually I have seen the post that you mentioned.

I think that I managed to fixed it. Reinstall VScode and Powershell extension.

Now it's working. Even if I type the "function" and in the middle of the word func... press tab it's complete the whole command itself and report the 4 problems,

image

but now when I remove the whole text in the editor, the problems are gone as well. Before they stuck somehow and intellisense were completely gone, Now it's ok.

image

@PrzemyslawKlys
Copy link
Contributor

Thanks for the tip. I did delete the Preview extension, restarted program a few times, deleted disabled extension of PowerShell and after reinstall of Preview PowerShell, it's much snappier. Before I was waiting 4 seconds on the newly open window, but now it's instant. Lets see how it behaves in future. @TylerLeonhardt just FYI. Maybe some kind of cache issue for all my upgrades. Something to potentially investigate as an option to clear/cleanup on upgrades maybe?

@PrzemyslawKlys
Copy link
Contributor

After few hours in Code the issue is back. So it's not related to total cleanup :(

@SydneyhSmith SydneyhSmith removed the Needs: Triage Maintainer attention needed! label Apr 23, 2020
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

3 participants