-
-
Notifications
You must be signed in to change notification settings - Fork 959
Debug language server
The same as VSCode, each language server have a output channel itself, the output channel could be opened by
:call CocAction('runCommand', 'workspace.showOutput')
Or
:Denite coc-command
to get command list and run command by type <enter>
.
To make output channel track LSP communication, set [languageserverId].trace.server
to true
in your coc-settings.json
.
For example, to make cssserver
track LSP communication, use:
"cssserver.trace.server": "verbose",
However, the output of LSP communication is difficult for human to read, you can upload the content to LSP inspector: https://microsoft.github.io/language-server-protocol/inspector/, which would be looks like:
You can use Chrome to debug language server which using node IPC for communication.
First, add execArgv
to the language server settings like:
"cssserver.execArgv": ["--nolazy", "--inspect-brk=6045"]
After the cssserver
started, open Chrome with url chrome://inspect
Make sure Discover network targets
option is checked, and then you will the debugging target.