-
-
Notifications
You must be signed in to change notification settings - Fork 388
"Trace server messages" setting doesn't show LSP JSON-RPC messages in the logs #1904
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
Hi, thanks for asking the question. To enable messages you can set the env var EDIT: The use of the en var is documented in the lsp package: https://github.com/haskell/lsp/blob/master/README.md but i think it is worth to add them here, in the troubleshooting section: https://github.com/haskell/haskell-language-server#troubleshooting-the-server |
Thanks for the details. export LSP_TEST_LOG_MESSAGES=true
export LSP_TEST_LOG_STDERR=true after sourcing it I started vscode and double checked that those env vars are indeed set for the haskell-language-server process: $ strings /proc/$(pidof haskell-language-server-8.8.4)/environ | grep LSP --color
LSP_TEST_LOG_STDERR=true
LSP_TEST_LOG_MESSAGES=true But I still couldn't see any json-rpc messages logged. Is it possible that HLS is starting session in some way that ignores those env vars? |
Mmm maybe i overlooked it and only are taken in account when the session is started using lsp-test (ultimately the env var names have TEST) EDIT: I think that is the case, sorry for the confusion: |
Seconded, this was very useful and it would be good to have it back! (Fortunately you can still get this from the client with the Emacs client) |
I think this ultimately means that |
Not sure if this is outdated but I think it's still somewhat useful to get the messages. |
This is no longer an issue. |
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 1.1.0.1 (GHC: 8.8.4) (PATH: /home/jhrcek/.local/bin/haskell-language-server) (GIT hash: 0cc89d209791c4bc200bf582f0e5f2a8b2465220) Tool versions found on the $PATH cabal: 3.4.0.0 stack: 2.7.1 ghc: 8.8.4
Which OS do you use:
Which lsp-client do you use:
Steps to reproduce
In vscode haskell extension setting set "Haskell > Trace: server" to "messages" (and then restart vscode to be sure extension setting was applied)
Expected behaviour
When I go to View > Output and select "Haskell" I'm expecting to see JSON-RPC messages being exchanged between vscode-haskell extension and haskell-language-server.
I'm pretty sure I saw messages like these when I used to use hie (haskell-ide-engine) but in HLS this setting doesn't seem to have any effect.
Actual behaviour
I "only" see debug messages, but no JSON-RPC messages.
The text was updated successfully, but these errors were encountered: