In the Language Server Extension Guide it says:
'If you are using
vscode-languageclient
to implement the client, you can specify a setting[langId].trace.server
that instructs the Client to log communications between Language Client / Server to a channel of the Language Client'sname
.For lsp-sample, you can set this setting:
"languageServerExample.trace.server": "verbose"
. Now head to the channel "Language Server Example". You should see the logs:
Where and how exactly do I specify this setting in VS Code?
What I do for php language server is adding "log": true
to launch.json file, Then the compiler will try to show logs when you press f5 to start debugging. But from what I understand from the documentation you have shared in your question, You can follow this instructions (I don't guarantee this will work, As I mentioned this is the instruction for what you have shared in your question):
Found it!
You need to create a new Node.js Attach run configuration in your launch.json
.
{
"name": "Attach",
"port": 6009,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
},
And change the port
from default 9229
to 6009
. You also need to pass this 6009 port in the ServerOptions
when instantiating new LanguageClient()
:
After that, when you start your plugin with F5, you can now go to the Run view and run the newly created "Attach" configuration alongside your client process:
When both processes are running, you can switch between them in the Call Stack section to see either your client console.log
s or your language server's:
Just after posting a bounty, of course, like always...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With