-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Local variables are collapsed in annoying ways #93230
Comments
@jrieken thanks for providing great feedback What we do:
I believe that 1) we can improve that we auto expand all non For some smarter auto expensions we could look at the @weinand @roblourens @connor4312 let me know what you think |
But that doesn't work when hitting the same breakpoint repeatedly, right? |
yes - this is insiders and believe js-debug the default there |
@jrieken should work when hitting the same breakpoint repeatedly And yes, js-debug is the default in insiders. |
It could be looking at the attached picture, there are 3 new |
Attached video shows the randomness that I am observing |
js-debug is still behind a flag as far as I know on Insiders. The call stack looks like the old debugger. But for either one trace:true will let you verify whether |
Thanks for sharing the video this show exactly that a block scope came in first and screwed up with the order, thus changing the ids. I have an idea how to fix this. |
Pushed a fix using the id computation from my previous comment. Bottom line @jrieken let me know if you still see weirdness, and we can look into those cases in more detail. Thanks |
Yes, still see weirdness. Nodes for locals or blocks are randomly collapsed, interleaved, the first, the last. idk - I am the only one seeing this? I feel like I am running into this too often for that to be true |
Then let's reopen. Assigning to April to investigate more then. |
@isidorn I am assuming that you also see this when self-hosting and that no more input from me is needed, right? It's hard to distill steps here but I'd say that locals or block variables are always collapsed except for one or two containers |
@jrieken when I self host I personally hit two issues:
Though I am not sure if we can do anything about these two cases. If you see the same scope with the same name lossing expansions state that would be very weird and I would be interested in more details (as I do not see that). |
Dumping some sample here, not sure if this is all the same root cause or not but it definitely makes me think negatively about our debug Debugging stopped at line 46 (no stepping, first stop)
|
Hard to say because I feel a sting when using debug bug things that I am confident about
|
Oh and the obvious, which I guess is more on the UI than on the adapter: never collapse something that I have manually expanded. |
Makes sense. The first three would have to handled on the extensions side. |
A sample of unwanted (out of the box) collapsing
|
another case
|
Thanks, Joh. Not sure I'll get to this for endgame but I'll aim for a fix early next week 🙂 |
Seems like most of the issues are on the js-debug side, thus unassigning myself. As for an autoExpand field in the scopes I have created this feature reuqest against the debug adapter protocol microsoft/debug-adapter-protocol#116 |
Before we start introducing new "UI hints" on the DAP side (which is problematic), could we just try to fully use the existing mechanism? Could we just use the scope's "expensive" attribute to control what's gets expanded, e.g.:
|
@weinand we can do that, however that might introduce a lot of breaking behavior. Since too many scopes may be expanded intially. Which would lead to a bad user experience. |
I don't think there's more I can do for js-debug wrt expansion in the current state. For example, the "locals" block that does expand: {
"name": "Block: doBusyWork",
"presentationHint": "locals",
"expensive": false,
"variablesReference": 12,
"line": 8,
"column": 9,
"source": {
"name": "main.js",
"path": "c:\\Users\\Connor\\Documents\\Github\\vscode-js-debug\\demos\\node\\main.js",
"sourceReference": 0
},
"endLine": 10,
"endColumn": 6
} and the catch block that doesn't: {
"name": "Catch Block: doBusyWork",
"presentationHint": "locals",
"expensive": false,
"variablesReference": 8,
"line": 15,
"column": 11,
"source": {
"name": "main.js",
"path": "c:\\Users\\Connor\\Documents\\Github\\vscode-js-debug\\demos\\node\\main.js",
"sourceReference": 0
},
"endLine": 17,
"endColumn": 4
} We send |
Back to @isidorn based on #93230 (comment) and based on the fact that it is still majorly annoying. |
I can change our heuristic that we expand all non expansive scopes. However I would only do that start of milestone to have a long time to gather feedback since I am not optimistic about that change. |
Maybe always expand the first scope (or the first N) if it's not expensive. |
@connor4312 that's what we do currently. We always expand the first scope if not expensive. |
I have pushed improvements to the Variables view that the view state should be better preserved.
Having all those togethers the behavior is now much improved. There might still be some corner cases, thus still not closing this issue. |
No negative feedback thus far, so closing. |
I have a launch config that attaches to an extension host and often (this seems somewhat random) the variable nodes are collapsed in super annoying ways (hello paper cuts). The first screen shot shows the view after hitting the first breakpoint. Not sure what/if something goes wrong but I think in no universe it makes sense to show all variables nodes as collapsed. The second screen shot is after stepping a bit and the variables view doesn't "follow" - I am already three blocks further down but nothing is reveal/expanded which makes this whole thing painful to work with.
The text was updated successfully, but these errors were encountered: