-
Notifications
You must be signed in to change notification settings - Fork 235
Integrating PSES into Visual Studio #1643
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 could you elaborate on this? A full repro example would also be very helpful
More specifically PS v5.1 but yeah definitely |
Thanks for so quick response, It is dirty a bit, but still the issue is on line # 195 of program.cs I guess |
I only guessing, maybe I do something wrong there by passing -HostProfileId 'myclient' ?... |
I think this line here might be the problem: Starting the language server in an elevated process is going to make is so non-elevated processes are unable to access the named pipe it creates. |
So, should I try to run Start-EditorServices.ps1 directly? |
I'd just comment out that line and give it ago however you've been doin' it. The verb |
Noup, didn't help, |
May it be because of:
I guess System32 folder is protected too much :) |
From other hand input pipe connected successfully... Have pushed all changes. |
Added System.IO.Pipes.PipeOptions.Asynchronous to make it async - didn't help :( |
afaik there's only one pipe, not one for read and one for write. an example session details file looks like this: {
"status":"started",
"languageServiceTransport":"NamedPipe",
"languageServicePipeName":"\\\\.\\pipe\\PSES_2wbpjblh.pnn",
"debugServiceTransport":"NamedPipe",
"debugServicePipeName":"\\\\.\\pipe\\PSES_ndg4d4tp.2pr"
} So it's unclear what exactly you're getting back in |
I have added this line: -SplitInOutPipes to startup.ps1,
and in program.cs reading it from sessionInfoObj.languageServiceReadPipeName and languageServiceWritePipeName properties, in runtime/debug values looks pretty correct... |
Oh okay I stand corrected, we support that apparently. I'd probably try to get it working without splitting them first as that's the most tested path. You're getting the same error message while not splitting right? When you get the exception can you verify that the serverName and pipeName are correct? |
Noup, it is "successfully" connected and silently hangs when try to call client.initialize
I see next values:
Not sure, but guess that's what should be there |
Just in case, I have looked around a bit (a lot :) ), Unfortunately for me most of them to be applied on server-side... |
@SeeminglyScience, one more Thanks for your help and attention, at least not I am not alone there now. |
Ah okay that's very different and more likely to be the exact thing we need to troubleshoot. That's also a little harder to direct you into places to check, so I'll need to build it myself and check some things a bit later. Can you push the latest changes?
I don't think this is related FYI |
Yes, I have pushed all I have. |
Finally I tried to compile PSES binaries locally and somehow it works now! |
That may be thanks to the awesome work @andschwa has done getting PSES to work in different clients ❤️ |
Hi,
Not sure is an issue or I doing something wrong...
I am trying to kickoff POC project to integrate PSES into Visual Studio.
Before starting to work on extension itself I would like to check how to deal with PSES in a simple console application (with some hardcoded settings).
First step is to start Server - is done. I guess it is done, at least I see running process, log.txt, StartEditorServices.log and sessionDetails.json files with proper data inside.
Second step is to create and initialize Client - and here is an issue...
I have find out that PSES itself using OmniShart under the hood to startup Server so I decided to go same way by using "OmniSharp.Extensions.LanguageServer.Client" and "var PsesLanguageClient = LanguageClient.Create(options => ..." to get an instance of Client.
I have stuck on "await PsesLanguageClient.Initialize(new CancellationToken()).ConfigureAwait(false);".
Playing with that in a different ways - I guess the issue is, request is sent but no response because of "Access deny" issue in internal "System.IO" implementation for named pipes.
Environment details:
startup.ps1 file looks like that:
Maybe you have or may provide simple sample? I have found some based on NodeJs but nothing for C#.
And maybe my main question is - do you officially support to work on Windows with combination of PS v5 and Net 4.7.1?
Please let me know if I may provide any additional information, and thanks a lot for any help...
The text was updated successfully, but these errors were encountered: