0

I'm following the VSCode tutorial on writing a language server and I'm struggling with showing log messages. The tutorial says:

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:

I've tried adding this option to any of the package.json files, as well as .vscode/settings.json (as per this source). I know there's a similar StackOverflow post but the author ended up creating their own output channel. Instead, I'd simply like to find the appropriate location. Just wondering whether I'm missing something very obvious or this part of the tutorial is incorrect.

William
  • 1,154
  • 1
  • 9
  • 15

1 Answers1

0

Simple answer for this one - it seems the output appears in the debugger extension window instead of the main window. Under the "output" tab, look for your language client's name. This is the second parameter in the LanguageClient constructor call in the client's extension.ts.

In addition, I set the default trace setting in the project's package.json to verbose:

"<client name>.trace.server": {
...
"default": "verbose"
}

With <client name> being the first parameter in the LanguageClient constructor call in extension.ts.

William
  • 1,154
  • 1
  • 9
  • 15
  • Bit more info, specifically you can set that here https://github.com/microsoft/vscode-extension-samples/blob/61d94d731c5351531a7d82f92f775f749203e3b5/lsp-sample/package.json#L40 – Rob Hinchliff Jan 04 '23 at 16:13