-
Notifications
You must be signed in to change notification settings - Fork 234
Timing issue in LanguageServer initialization #221
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
Comments
hmm, still present after a reinstall. |
I can't repro this. Are you on VSCode 1.1.0 or an Insider's or Alpha build of VSCode? |
I think he told me on Twitter that he's using the Insider build. Usually I see this error when PSES crashes at startup but it started up fine for him when he launched it directly. Might be something wonky with the extension code. I haven't been able to repro it either though. |
The Editor Services is actually running, but f8 is totally broken. Intellisense is working, but f8 gives that error. I just updated my main desktop and seeing the same issue. |
I'm on 1.1.0 insider |
I restarted my desktop and it started working, but i've restarted my laptop VM a few times and still seeing the issue. I will see what I can figure out. |
Here is what I am seeing in the console. That is the only error. When i use f8 and it errors, it doesn't output anything to the editorservices logs with verbose enabled.
|
Here is one thing i've noticed. On my desktop, when it wasn't working I placed $psEditor in a script and ran it in the debugger. It was null. The same happens right now on my laptop that f8 is broken on. Now that my desktop is working, $psEditor properly returns an object. |
Huh... Interesting. I wonder if they changed the API? Have you tried in non-Insider VS Code on your VM? |
Well, I think something is hanging. If I reload the editor on my desktop, and execute f8 right as it comes back up, I get that error. If I wait a couple seconds and then try it again, it works. It makes me think the editor services are not fully loading or getting partially hung up or something. I will go download the Normal one and give that a try after lunch. |
Yeah, it takes a couple seconds before PSES is fully initialized. Maybe on your VM it just takes a bit longer and it eventually works? |
Nope, never loads. I just finished installing the non-insider version and it is working in it. I will use it on my laptop for the time being until this get figured out. Let me know if there are any sort of tests or things you'd like me to try. |
OK maybe the Insider build has broken it somehow, I'll take a look there. |
Well, it eventually started working on my Desktop with Insider. I am not sure what it was that made it start working on my Desktop though. |
For the record, I'm on Windows 10 build 10586, no insider build, and I experienced this as well. |
I've got a pretty clear picture of what's happening now. There appears to be a timing issue that's causing the language server's initialization to not complete. This causes the error you see and the subsequent lack of IntelliSense. Will get an update shipped this week to resolve this issue. Related bug: PowerShell/vscode-powershell#183 |
Same here, if I open a folder with about a 100 files, the service is rarely available. |
Interesting... The number of files in the folder shouldn't have a direct impact on the initial loading sequence. I might need to see if there's something happening there that I didn't expect. |
Also, if the git diff markers (red & green lines next to the line numbers column) appear then the profile is never loaded. |
I mean, if the git diff markers shows before the profile is loaded then it never will. |
Guys, any workaround? |
There isn't one unfortunately since it's caused by how long the language server startup takes. I'll have a fix out in a day or two. |
Fix #221: Occasional init hang in LanguageServer
Fix was pretty simple. I'll see if I can get the update out today! |
Just shipped the 0.6.1 update, let me know if things are working right for you now! |
Works now! Brilliant! Many thanks! |
Glad to hear it! |
Hello, I am having same issue with VS Code, I am on VS code version 1.1.1 and I am using Windows 7 and Power shell version 2.0 , Is it not supported on Win 7 with PS 2.0 ?? |
The extension supports PowerShell v3 and higher. V2 is not supported. V5 is available for Windows 7. I'd recommend that if you can update. Where I work we updated all our Windows 7 machines to at least V4. |
After updating it appears PowerShellEditorServices is not properly starting.
I am getting the following error.
"No Handler found for the command: 'PowerShell.RunSelection'. An etension might be missing an activation event."
Tried restarts and a reboot. Will try reinstalling the extension next.
The text was updated successfully, but these errors were encountered: