Skip to content

Intellisense/Tab-completion Intermittent Failures #726

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
pcarnella opened this issue May 10, 2017 · 4 comments
Closed

Intellisense/Tab-completion Intermittent Failures #726

pcarnella opened this issue May 10, 2017 · 4 comments

Comments

@pcarnella
Copy link

pcarnella commented May 10, 2017

System Details

  • Operating system name and version: Windows 10 Pro
  • VS Code version: 1.12.1
  • PowerShell extension version: 1.0
  • Output from $PSVersionTable:
    Name Value
    PSVersion 5.1.14393.693
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.14393.693
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1
Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here

code -v
$pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      0      0
code --list-extensions --show-versions
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ code --list-extensions --show-versions
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
$PSVersionTable

Issue Description

Tab completion often fails for me. For example, typing "get-pro" or "get-serv" and hitting Tab does not complete the command as expected, it will just tab the cursor over. I works if I type slowly or wait a second. Very repeatable. I've had this problem on multiple versions, going back over a year. I tried completely re-installing VSCode/PowerShell extension and deleting code folder in user profile.

Attached Logs

I see this repeated in the log every time the issue happens:

5/10/2017 3:21:10 PM [ERROR] - Method "DispatchMessage" at line 301 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

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

@daviwil
Copy link
Contributor

daviwil commented May 10, 2017

@pcarnella thanks for the report! That log statement doesn't give enough context, can you grab the lines that are indented below it too? That'd be helpful.

When this problem occurs, does the situation improve after running this command in the integrated console:

Remove-Module PackageManagement

@pcarnella
Copy link
Author

Thanks for looking into it, some more info...

PackageManagement module not loaded:

Remove-Module : No modules were removed. Verify that the specification of modules to remove is correct and those modules exist in the runspace.
At line:1 char:1

  • Remove-Module PackageManagement

5/10/2017 7:59:16 PM [ERROR] - Method "DispatchMessage" at line 301 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

MessageDispatcher: No handler registered for Event type '$/cancelRequest'

That's all there is in the log when the issue happens.

@daviwil
Copy link
Contributor

daviwil commented May 11, 2017

Interesting that the editor is sending a cancellation request... I wonder what's going on there. Can you e-mail me the whole log file? daviwil at microsoft.com.

@rjmholt
Copy link
Contributor

rjmholt commented Oct 16, 2018

The $/cancelRequest message is something that VSCode sends when it wants the language server to move on. We mark not handling the cancellation message as an error but there's no semantic harm in ignoring it (see here). The log will mark this as a warning from the next release, rather than an error.

I think the problem above is a performance issue, which we're tracking in #1256. I'm going to close this as a duplicate (even though it came first) so we can consolidate information.

@rjmholt rjmholt closed this as completed Oct 16, 2018
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