Empty error on LSP onDidStop

I’m working on an LSP extension but the server is failing to start and the error that is being caught is empty. How should I debug this?

I’ve worked on TailwindCSS LSP implementation, but there is an issue with textDocument/codeAction method: Unhandled method textDocument/codeAction when developing LSP extension

This actually happened to me when I was trying to work on an ESlint LSP implementation as well. So there is clearly some other errors happening that are being caught but the value is not being assigned to the error variable. Pretty frustrating. Sounds like you manage to get yours at least working somewhat?

Yeah, but I have been successful in a small way - the plugin was logging in the console and returning console logs. It seems to me that Tailwind’s LSP relies very heavily on the textDocument/codeAction method :confused:

Try starting the server yourself with a shell command that mimics your code.

For example, if you use these server options:

const serverOptions = {
    path: "/hehe/hoho",
    args: ["lorem", "ipsum"]
}

Run this command in a terminal:

"/hehe/hoho" "lorem" "ipsum"

The quotations ensure that the right arguments are passed, even if they include spaces or other characters which would otherwise be treated in special ways by the shell.