Fix threads not fetched after restarting debug adapter#88790
Merged
isidorn merged 1 commit intomicrosoft:masterfrom Jan 17, 2020
Merged
Fix threads not fetched after restarting debug adapter#88790isidorn merged 1 commit intomicrosoft:masterfrom
isidorn merged 1 commit intomicrosoft:masterfrom
Conversation
A RunOnceScheduler (this.fetchThreadsScheduler) is used to throttle
fetching threads from debug adapters. this.fetchThreadsScheduler is
disposed when a debug adapter is restarted because of:
this.rawListeners.push(this.fetchThreadsScheduler);
This causes threads to never be fetched after restarting the debug
adapter.
This is fixed by setting this.fetchThreadsScheduler to undefined after
it is disposed. This way, a new RunOnceScheduler is created after
restarting the debug adapter.
Fixes microsoft#88784
Contributor
Author
|
Hmm... CI errors seem unrelated to this PR. |
Contributor
Author
|
It turns out this was caused as a side-effect of not using language server protocol correctly, not sure if it is a "real" bug or not. |
Contributor
Author
|
The specification says "A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the ‘initialize’ request has finished)." So either the specification needs to say "required" instead of "expected" or there is a bug in VS Code. |
Collaborator
|
This fix is good, thanks for providing it. Merging in this PR. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A RunOnceScheduler (this.fetchThreadsScheduler) is used to throttle
fetching threads from debug adapters. this.fetchThreadsScheduler is
disposed when a debug adapter is restarted because of:
This causes threads to never be fetched after restarting the debug
adapter.
This is fixed by setting this.fetchThreadsScheduler to undefined after
it is disposed. This way, a new RunOnceScheduler is created after
restarting the debug adapter.
Fixes #88784
This PR fixes #