Skip to content

Sort threads in response order #128686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2021
Merged

Sort threads in response order #128686

merged 2 commits into from
Aug 2, 2021

Conversation

suzmue
Copy link
Contributor

@suzmue suzmue commented Jul 14, 2021

Return the threads in getAllThreads in the same order as they
were received in the threads response. This handles
the case where the thread order changes, or new threads are
added that are not just appended to the list.

This PR fixes #128546

Return the threads in getAllThreads in the same order as they
were received in the threads response. This handles
the case where the thread order changes, or new threads are
added that are not just appended to the list.

Fixes microsoft#128546
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 14, 2021
@weinand weinand added this to the July 2021 milestone Jul 14, 2021
@weinand weinand removed their assignment Jul 14, 2021
@weinand weinand self-requested a review July 14, 2021 23:43
@@ -729,9 +735,9 @@ export class DebugSession implements IDebugSession {
}

rawUpdate(data: IRawModelUpdate): void {
const threadIds: number[] = [];
this.threadIds = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to also call this.threadIds = [] in the clearThreads method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@isidorn isidorn modified the milestones: July 2021, August 2021 Jul 27, 2021
@isidorn
Copy link
Collaborator

isidorn commented Jul 27, 2021

@suzmue PR looks good. I only found one minor thing. Once you tackle that, next week I am open to merge this in.
Thanks a lot!

@isidorn isidorn merged commit d8d7e1b into microsoft:main Aug 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sort order of threads from debug adapter is not maintained
3 participants