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

Variables View Loses Expansion State when Stepping #6580

Closed
ParOvBroadcom opened this issue Nov 19, 2019 · 12 comments · Fixed by #10338
Closed

Variables View Loses Expansion State when Stepping #6580

ParOvBroadcom opened this issue Nov 19, 2019 · 12 comments · Fixed by #10338
Assignees
Labels
bug bugs found in the application debug issues that related to debug functionality help wanted issues meant to be picked up, require help 🤔 needs more info issues that require more info from the author

Comments

@ParOvBroadcom
Copy link

Description

When using the resume, step next or step in functions, the scope tree in the Variables view refreshes completely in Theia, this leads to a collapsed tree, while the tree in VSC remains to the previous state and leaves any expanded part as it is, by just refreshing whatever needs to. Is there a way to do the same in Theia?

Reproduction Steps

Start a debug session using DAP through Theia. When stopped in a specific breakpoint expand the scope and maybe some of the variables. Resume or step in or step over to the next breakpoint. The variable tree is completely disappearing and reappearing (really fast) and thus it is collapsed to the original scope only

Windows 10 and Theia version: 0.11.0

Diagnostics:
No diagnostics

@akosyakov akosyakov added bug bugs found in the application debug issues that related to debug functionality help wanted issues meant to be picked up, require help labels Nov 19, 2019
@tsmaeder tsmaeder changed the title DAP - Different behavior between VSC and Theia (Reloaded) Variables View Losese Expansion State when Stepping Nov 21, 2019
@tsmaeder
Copy link
Contributor

Changed the title to reflect the problem being described. Yeah, this behaviour is annoying.

@tsmaeder tsmaeder changed the title Variables View Losese Expansion State when Stepping Variables View Loses Expansion State when Stepping Nov 21, 2019
@tolusha tolusha self-assigned this Dec 3, 2019
@tolusha
Copy link
Contributor

tolusha commented Dec 4, 2019

I can't reproduce. Is it os or browser specific issue?
screencast-localhost_3000-2019 12 04-17_20_38

@tolusha
Copy link
Contributor

tolusha commented Dec 5, 2019

@ParOvBroadcom Is it still actual?

@akosyakov
Copy link
Member

akosyakov commented Dec 5, 2019

It could be timing issue, we debounce with 400ms:

protected readonly refresh = debounce(() => this.fireDidChange(), 400);

@ParOvBroadcom Could you provide more concrete steps?

Maybe it is not even reproducible locally (i.e. VS Code does not do a remote call), but with some latency. @ParOvBroadcom Do you run locally?

@akosyakov akosyakov added the 🤔 needs more info issues that require more info from the author label Dec 5, 2019
@ParOvBroadcom
Copy link
Author

It doesn't work properly in either way (resume or step over)
First having a running session
1
Then expanding the local variables
2
Clicking on Resume
3
It collapses the Local variables
4
Expanding again the variables
5
Clicking on step over
6
Collapses the local variables also
7

@akosyakov
Copy link
Member

@ParOvBroadcom Is there a way to run your debug adapter or reproduce without it? It does not seem to happen with other.

@ParOvBroadcom
Copy link
Author

@akosyakov What do you mean without "it"? This happens in Theia, but not in VScode.

@tolusha
Copy link
Contributor

tolusha commented Dec 6, 2019

We need a debugger to reproduce the issue,
It can't be reproduced neither with node nor java debug.

@ishche
Copy link
Contributor

ishche commented Dec 6, 2019

It could be timing issue, we debounce with 400ms:

protected readonly refresh = debounce(() => this.fireDidChange(), 400);

I increase debounce and it makes things better.
@akosyakov seems you right about it. We have pretty big delays in communication to target.

@tolusha, unfortunately, we can't provide our debugger.

@akosyakov
Copy link
Member

@ishche How much do you need to increase?

@tolusha tolusha mentioned this issue Dec 11, 2019
1 task
@tolusha
Copy link
Contributor

tolusha commented Dec 11, 2019

@akosyakov
@ishche
I've submitted a draft PR to check if proposed solution make sense.
#6734

@tsmaeder
Copy link
Contributor

To me it seems we need to disassociate the expansion state of a particular stack frame (or whole stack) from the variables view: when we switch between active stack frames (be it by stepping or by selecting a different thread), we want to restore the expansion state we had before. Since the tree contents are switched out, the tree cannot hold that state.

This state should not be located in the "domain model", but in a separate "presentation model" that has a policy on how many variable expansion states to remember (maybe a fixed LRU or something similar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application debug issues that related to debug functionality help wanted issues meant to be picked up, require help 🤔 needs more info issues that require more info from the author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants