11

Situation

I'm experimenting with writing a VSCode Language Server Protocol (LSP) Extension. I've got it running as follows:

  • An lsp-server process which is launched by running haskell-lsp-example-exe from terminal
  • An lsp-client written in Typescript which, for now, basically just launches lsp-server (it's based on the lsp-sample repo)

The lsp-server is launch as follows:

# extension.ts
let serverOptions: ServerOptions = {
  run: {
    command: "haskell-lsp-example-exe"
  },
}

The lsp-client is launched using code --extensionDevelopmentPath="path/to/extension"

I can see that it launches correctly, and I can find its pid through Activity Monitor (I'm on Mac).

Question

How can I see the logs of this process which is spawned by VSCode?

Context

I have tried the following:

  • In lsp-client/package.json I set the following which gives me the messages going back and forth. But not the logs of lsp-server.:
    "languageServerExample.trace.server": {
      "scope": "window",
      "type": "string",
      "enum": [
        "off",
        "messages",
        "verbose"
      ],
      "default": "verbose",
      "description": "Traces the communication between VS Code and the language server."
    }
  • I've also tried opening up dev tools in the launched instance of VSCode, but that gives the logs of lsp-client
  • The log labelled Log (Extension Host) in the launched instance of VSCode also doesn't look too useful

Thanks in advance for any help!

rjmurt
  • 1,135
  • 2
  • 9
  • 25

0 Answers0