-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom request to return LSP internal state (#3194)
### Motivation Diagnosing concurrency issues in the LSP tends to be very difficult and without more detailed information about the state of the language server, it becomes extra challenging to understand what's going on. Let's add a command to surface internal state information, which we can hook to a command in the extension. When users manage to reproduce the problem, they can invoke the command and provide richer details. ### Implementation The idea is to return internal state information that may be relevant to diagnose a corrupt state or crash. For now, I included the state of the worker, backtrace, size of the incoming queue and all stored documents. This should hopefully help us understand the following things: 1. Is the worker dead or just stuck? 2. If it's stuck, where is it stuck? Is the queue increasing causing the worker to get backlogged? 3. Why did we get stuck? Are the documents we stored in an out of sync state with the client? ### Automated Tests Added a test.
- Loading branch information
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters