Skip to content

Language Features still stops working after a while and never recovers #2627

Closed

Description

Issue Description

I am experiencing a problem with...IntelliSense not working after a while.

I am aware of a recent fix and other closed issues:

But I still experience issues, far less but still.

Attached Logs

1586591887-8aec1d54-a22f-4e9a-9d5a-026cf95b0ba11586539769772.zip

Follow the instructions in the README about
capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.18363
VSCode 1.44.0
PowerShell Extension Version 2020.4.1

PowerShell Information

Name Value
PSVersion 5.1.18362.752
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.18362.752
BuildVersion 10.0.18362.752
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
autoit Damien 1.0.4
beautify HookyQR 1.5.0
bracket-pair-colorizer-2 CoenraadS 0.0.29
code-settings-sync Shan 3.4.3
codesnap adpyke 1.0.27
excel-to-markdown-table csholmq 1.2.2
gistfs vsls-contrib 0.0.65
github-linker gimenete 0.2.3
gitlens eamodio 10.2.1
html-preview-vscode george-alisson 0.2.5
markdown-all-in-one yzhang 2.8.0
markdown-preview-enhanced shd101wyy 0.5.2
markdown-shortcuts mdickin 0.12.0
material-icon-theme PKief 4.0.1
pdf tomoki1207 0.5.1
powershell-preview ms-vscode 2020.4.1
project-manager alefragnani 10.11.0
reg ionutvmi 1.0.1
theme-monokai-pro-vscode monokai 1.1.15
vscode-html-css ecmel 0.2.3
vscode-markdownlint DavidAnson 0.34.0
vscode-pull-request-github GitHub 0.15.0
vscode-toggle-quotes BriteSnow 0.3.2
vscode-versionlens pflannery 0.25.0
vscode-wakatime WakaTime 4.0.0
vscode-yaml redhat 0.7.2
xml DotJoshJohnson 2.5.0

Activity

  1. ghost added
    Needs: Triage
    on Apr 11, 2020
  2. TylerLeonhardt commented on Apr 11, 2020

    @TylerLeonhardt
    Member

    Honestly, at this point, the problem has to be deep in PowerShell Editor Services's handling of the PowerShell runspace.

    I've tried to avoid diving into that as it will take a lot of time and will involve coordinating with Dongbo Wang (@daxian-dbw) on PSReadLine but unfortunately that's where we're at.

    I'll need more people to bother Steve Lee (@SteveL-MSFT) here and on Twitter to treat this as a priority.

  3. mrboring commented on Apr 12, 2020

    @mrboring

    TylerLeonhardt I experienced this once yesterday. I commented here as #2522 is now closed.

  4. daxian-dbw commented on Apr 12, 2020

    @daxian-dbw
    Member

    I also experienced the same with PowerShell extension 2020.3.0 with PowerShell 7.0.

    Basically, intellisense stops working after a while. Then, if you run a command in the integrated console, it doesn’t get executed, but instead the command prompt will be displayed immediately, and after that things starts to work again. But the same will happen after a while again.

  5. PrzemyslawKlys commented on Apr 12, 2020

    @PrzemyslawKlys
    ContributorAuthor

    Maybe related: #2364

  6. TylerLeonhardt commented on Apr 12, 2020

    @TylerLeonhardt
    Member

    Dongbo Wang (@daxian-dbw) the Preview extention has a bunch of work in it to prevent this... But this issue claims it isn't completely fixed.

  7. added
    Issue-Bug
    Issue-Performance
    and removed
    Needs: Triage
    on Apr 14, 2020
  8. rkeithhill commented on Apr 21, 2020

    @rkeithhill
    Contributor

    I'm seeing a similar issue and I never started a debug session. I'm on preview 2020.4.2 (VSCode 1.44.2) and here's my log zip. I'm not seeing anything obvious here. BTW it is cool that cancel requests indicate the message number they're cancelling. I just wish the original LSP msgs displayed their request number.
    EditorServices.zip

  9. ghost added
    Needs: Maintainer Attention
    on Apr 21, 2020
  10. rkeithhill commented on Apr 21, 2020

    @rkeithhill
    Contributor

    OK, my PSIC is completely unresponsive which would explain why completions aren't working. :-) Now, why is PSIC wedged?

  11. PrzemyslawKlys commented on Apr 21, 2020

    @PrzemyslawKlys
    ContributorAuthor

    Weirdly enough when I deleted PS extension and reinstalled it everything seemed snappier. But it came back to being slow after a while. I restart PS Extension about 3 times per hour now.

  12. 195 remaining items

  13. PrzemyslawKlys commented on Jun 2, 2020

    @PrzemyslawKlys
    ContributorAuthor

    Nate Ferrell (@scrthq) well they didn't fix it. They should use the meta module because a lot of people still use the old one, and they will have the same problems as I did. It has 500k downloads per version. Can you try to ask them to just meta it?

  14. SeeminglyScience commented on Jun 2, 2020

    @SeeminglyScience
    Collaborator

    Przemysław Kłys (@PrzemyslawKlys) if they did that they'd be back to square one. If a module imports other modules but does not export the commands then nothing is exported. If they do export the commands from the nested modules, they are back to exporting 4k commands in a single module.

    Nate Ferrell (@scrthq) awesome! Thanks for the update 🙂

  15. PrzemyslawKlys commented on Jun 2, 2020

    @PrzemyslawKlys
    ContributorAuthor

    Patrick Meinecke (@SeeminglyScience) the way Azure module does it is you have meta module that downloads other modules, which have exported commands? I would guess this doesn't impact performance at all? Meta module simply is there so if user asks for AWSPowerShell it gets downloaded all 200 modules with proper commands?

    Edit. removed azure links as they seem to have changed something.

  16. scrthq commented on Jun 2, 2020

    @scrthq

    To be fair, if AWSPowerShell just had the AWS.Tools.* as RequiredModules, the command help/intellisense would resolve to the service specific Tools module, so that wouldn't theoretically result in the same issue. Wouldn't be my place to ask any more than yours, Przemysław Kłys (@PrzemyslawKlys), as I don't work for AWS, unfortunately, just a large user of AWS at our org with plenty of AWSPowerShell usage.

  17. PrzemyslawKlys commented on Jun 2, 2020

    @PrzemyslawKlys
    ContributorAuthor

    You see that I don't get. If a module is a proper module with all cmdlet/functions/aliases described doesn't that mean ultimately any get-help/get-command doesn't need to do any heavy searching but has this widely available? So if you bundle 50 of those modules as a meta module which has a single purpose of being "download this modules which have proper psd1 file" purpose it would solve the issue no?

  18. SeeminglyScience commented on Jun 2, 2020

    @SeeminglyScience
    Collaborator

    It's explicitly importing all of it's nested modules into the global scope.

    1. This makes it impossible to be used as a nested module
    2. It doesn't inform the user about what it adds to the session
    3. In general makes interacting with the module itself work differently than every other module
    4. Doesn't actually do anything unless you explicitly import the meta module

    It's not really something I'd ever recommend folks to do.

  19. PrzemyslawKlys commented on Jun 2, 2020

    @PrzemyslawKlys
    ContributorAuthor

    So let me get this straight:

    1. AWSPowerShell module exists and has 4k+ commands that are not defined in PSD1 and people continue using it, and it alone is a big performance impact
    2. AWS.Tools.xxx exists each with its own properly defined commands

    Since AWSPowerShell, basically does now what 50+ properly modules does together, I would assume that if they create a meta module with required modules defined for all 50 modules it means that:

    1. All 50 modules get imported if you do Import-Module AWSPowerShell, but instead of it commands it imports 50 other modules with properly described commands.
    2. Since all those 50 modules exist and are properly defined the import for their data is not performance affected at all
    3. It's possible to not call AWSPowerShell but call whatever you need directly
    4. It solves performance issue for everyone currently using AWSPowerShell in Code

    And I would guess if you put AWSPowerShell into RequiredModules of something else it will work too. Module X defines RequiredModules AWSPowerShell, AWSPowerShell defines AWS.Tools and nesting works as far as I remember up to 5. When you download module X it will auto download all other stuff, and I guess Import-Module of module X will properly work, as if the commands from AWS.Tools will be required those will be imported on demand?

    What I am not understanding here? Keeping AWSPowerShell module as is, has huge impact that can be at least somewhat minimalized?

    I'm not expecting AWSPowerShell to continue being used, but if someone does Import-Module AWSPowerShell it will work - I have similar meta modules for projects I have integrated into other modules and they do work, so not sure I understand what I did wrong or how this could be worse than what we have now?

  20. SeeminglyScience commented on Jun 2, 2020

    @SeeminglyScience
    Collaborator

    I gave some reasons why I don't personally recommend the practice in my comment above. That said, feel free to pitch it to the AWS team, they very well may disagree.

  21. GuruGarrett commented on Jun 4, 2020

    @GuruGarrett

    I just wanted to note that I went a few days without having any issues with the 5.1-CI.54138 build, and it looks like I just got updated to 6.0. I'm very hopeful all the issues that caused me so much frustration are now a thing of the past.

    A huge thank you to TylerLeonhardt Dongbo Wang (@daxian-dbw) David Driscoll (@david-driscoll) and anyone else who played a part in this fix that I missed! 👍

  22. TylerLeonhardt commented on Jun 4, 2020

    @TylerLeonhardt
    Member

    Thank you all for your quick responses and helping us help you ❤️

  23. david-driscoll commented on Jun 5, 2020

    @david-driscoll

    I'm just glad to hear things are working well without any issues! For a time there I thought I was going to have to back to the drawing board and just start from scratch. 😄

  24. ghost added
    Needs: Maintainer Attention
    on Jun 5, 2020
  25. removed
    Needs: Maintainer Attention
    on Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions