Skip to content
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

c# LSP: Viewing OmniSharp log file #1876

Closed
mcraveiro opened this issue Jul 3, 2020 · 3 comments
Closed

c# LSP: Viewing OmniSharp log file #1876

mcraveiro opened this issue Jul 3, 2020 · 3 comments
Labels

Comments

@mcraveiro
Copy link

Hi LSP devs,

Thanks for a great mode. As per conversation in the gitter channel:

I've been using it on windows for c# and it works quite well. One question though, is there a way to see the OmniSharp log? I can see the log of messages and replies sent to OmniSharp, but I haven't found a way to see the server log itself, like I could with omnisharp-emacs.

the problem I am trying to troubleshoot in particular is the case where I make changes to a csproj file but it seems OmniSharp does not reload the project. This was working for omnisharp-emacs so I suspect I must have broken something, but without the log its not easy to figure out what.

@yyoncho suggested that @razzmatazz may know the answer to this question.

Many thanks for all your hard work.

Marco

@mcraveiro mcraveiro changed the title cViewing OmniSharp log file c# LSP: Viewing OmniSharp log file Jul 3, 2020
@razzmatazz
Copy link
Collaborator

razzmatazz commented Jul 5, 2020

Hi @mcraveiro. I believe, the log level is configurable but we don't have configuration for it in lsp-csharp.el (yet). I have not personally tried configuring it (or if it actually works) but..

The code for setting configuration level is there:

And according to code here:

It should be configurable via --loglevel | -l switch.

You could try appending -l Debug to the function lsp-csharp--language-server-command here:

.. by changing the code to:

(defun lsp-csharp--language-server-command ()
  "Resolves path and arguments to use to start the server."
  (list (lsp-csharp--language-server-path) "-lsp" "-l" "Debug"))

There has been quite some changes made recently to lsp support in omnisharp-roslyn and more are coming, so it could be that log level configuration is broken.

@mcraveiro
Copy link
Author

Hi @razzmatazz,

thanks for the prompt response. I will try to modify the log level and see what comes out.

Cheers

Marco

@mcraveiro
Copy link
Author

This worked as expected. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants