Skip to content
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

Preserve tree state in debug Variables view #76476

Merged
merged 6 commits into from
Jul 4, 2019
Merged

Preserve tree state in debug Variables view #76476

merged 6 commits into from
Jul 4, 2019

Conversation

haneefdm
Copy link
Contributor

@haneefdm haneefdm commented Jul 2, 2019

This fixes issues #76427 and #25652 (duplicates). I mentioned in detail what was causing the issue in #76427.

We save and restore the tree state between a stopped->running transition and back to stopped in conjunction with the Call Stack window which keeps track of the current thread/frame context.

It also preserves the visually nice feature of not flashing if those transitions happen quickly (within a half a second) but longer periods between transitions will clear the Variables window (so the user cannot interact with it). The only difference is that if eventually, the debugger stops, we restore the tree instead of going back to the default state.

I tested it with cpptools (MIEngine) and the typescript debuggers.

@isidorn
Copy link
Contributor

isidorn commented Jul 3, 2019

@haneefdm thanks a lot for your PR.
This looks good to me. But I think it can be further simplified, can you please try to address my comment. If you think it is not possible let me know and I can look into it.

@haneefdm
Copy link
Contributor Author

haneefdm commented Jul 3, 2019

I don't know why all builds are failing. Pretty sure it is not my change that is causing it. How do I restart the checks/builds. I must have done my push exactly at the wrong time.

@haneefdm
Copy link
Contributor Author

haneefdm commented Jul 3, 2019

@isidorn I forced a restart of the checks with virtually no change, and this time it only fails on macOS in integration tests (before everything failed during 'Install Dependencies'). Perhaps I should wait for a quiet time and try again. This never happened to me before. Please advise me if there is a better way to start the checks/builds without modifying code.

In the meantime, would it be possible for you to review my comments and the solitary change I made?

@isidorn
Copy link
Contributor

isidorn commented Jul 4, 2019

Do not worry about the build failures. Sometimes they fail randomly which seems to be the case now.
I will review your changes today. Thank you

@isidorn
Copy link
Contributor

isidorn commented Jul 4, 2019

Thanks a lot for your PR. Looks great, merging in 🎉
I have tried it out and it works nicely!
It even has a nice side effect that if I stop debugging, and start again the variable view state is preserved. I personally like this.
Let's push to insiders to get feedback.

@isidorn isidorn merged commit 0b1b5be into microsoft:master Jul 4, 2019
@isidorn isidorn added this to the July 2019 milestone Jul 4, 2019
@haneefdm
Copy link
Contributor Author

haneefdm commented Jul 4, 2019

Thank you so much. Yes, that side effect was intentional :-) At one point I was looking at the current state of the debugger to save state and then I removed it, because this felt a lot better.

@isidorn
Copy link
Contributor

isidorn commented Jul 4, 2019

Great thanks. Yeah it seems good. Let's try it out in insiders and see what feedback comes.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants