OmniSharp / OmniSharp/csharp-language-server-protocol

Logging JSON RPC messages

Open
#449 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
638
Forks
109
Avg merge
1m
Merged PRs (30d)
2

Description

Hello, I hope this is the right place to post this. If not, I apologize and please point me in the right direction.

I have been using this (great) implementation to build a language server that communicates with a vs code extension that uses the vscode-languageclient package. I am using version 18.1 of the server and 7.0.0-next.12 of vscode-languageclient.

I have implemented about 10 handlers and all is good but I've still never figured out how I can print the actual JSON RPC messages that are being sent between my server and my extension project. I can log just fine using Serilog and write to the output window in my extension with the ILanguageServerFacade and ITextDocumentLanguageServer interfaces but only with content I put in as strings, not the JSON RPC messages themselves.

I am not sure if this is something that I do with the ConfigureLogging method in the LanguageServer declaration or if there's another method or what, I can't seem to figure it out. I've gotten this far without it but I would really like to see these messages for a better understanding of the communication between client and server.

I should mention that I followed the Language Server Extension Guide that explained how to create a setting in the extension to set the verbosity of the communication between the server and client and print it, and I have done this and set the setting to "Verbose," but still, I only see my own hard-coded strings from the ILanguageServerFacade, etc. In the screenshot in the link, JSON RPC messages are printed, so I just don't understand. I assume it is because I need to manually configure this somewhere and don't know how..

Any help would be great and an example would be awesome. Thanks ahead for any help and if I need to post any code, I can.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the LanguageServer declaration and its ConfigureLogging method, then compare the repository behavior with the linked Language Server Extension Guide and the reported Verbose setting. Done means identifying the relevant configuration or limitation and documenting a reproducible example for viewing JSON-RPC messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.