This is a repository adapted from lsp-sample to demonstrate
- Usage of the JSON output
- Streaming the JSON into LSP Inspector
- With
[email protected], you can specify a JSON log output format with[langId].trace.serveras follows: - A webview build of the LSP Inspector can be downloaded here: https://marketplace.visualstudio.com/items?itemName=octref.lsp-inspector-webview
- When using the Webview LSP Inspector, it will open a WebSocket Server taking incoming connection that sends logs following this format.
- You can stream the JSON log of any Language Server using
vscode-languageclientto the LSP Inspector, and it will show a live view of the LSP connection.
- Install the LSP Inspector Webview extension
- Compile and Run this Extension
npm installnpm run compile- F5 to run the extension
- Add the following setting:
"languageServerExample.trace.server": { "format": "json", "verbosity": "verbose" },
- Open a txt file so this Language Server gets activated
- Run command "LSP Inspector: Start LSP Inspector"
- Run command "Start Stream Logs into languageServerExample.port"
- As you are typing, doing auto-completion, many messages should show up in the inspector, such as
textDocument/didChangetextDocument/completiontextDocument/publishDiagnostics
