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

Support variable paging (aka chunked arrays) #9537

Closed
weinand opened this issue Jul 20, 2016 · 4 comments
Closed

Support variable paging (aka chunked arrays) #9537

weinand opened this issue Jul 20, 2016 · 4 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Jul 20, 2016

Currently large data structures (Array, Map, Set) are broken into "chunks" in the debug adapter. Potentially this results in lots of duplication.

This feature request asks for doing this in the VS Code debugger UI once and for all.

An implementation sketch:

  • if a variable, scope, or evaluate result has a totalCount attribute, check whether its value is larger than some (configurable) threshold.
  • if yes then insert intermediate variable nodes between the parent and the children so that every node covers the range 0..threshold-1. Show this range as the label of the intermediate node.
  • if an intermediate node is expanded, fetch only the corresponding range of children via the variablesRequest and the new start and count arguments.
  • return a value of true for the supportsVariablePaging capability to indicate that the UI handles variable paging.

The corresponding protocol addition: microsoft/vscode-debugadapter-node#31

@weinand weinand added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Jul 20, 2016
@rozzzly
Copy link

rozzzly commented Jul 21, 2016

Speaking of debugging Maps, Sets, etc.. actually viewing the values is huge a pain in the ass, you have to expand through like 4 levels to actually see it's data. Really time consuming when jumping from frame to frame!

How about something where when you expand the node of a Set/Map/etc object, its members are displayed as usual, but after those, there's a new "virtual* node which is collapsed. We could italicize, name it something like ( expand to view data... ) to indicate the node doesn't actually exist on the . Expanding that node would display the entries within the Map/Set/etc.

I'm going to think more on this.. maybe submit a proposal.

@weinand
Copy link
Contributor Author

weinand commented Jul 21, 2016

@rozzzly when you are talking about '4 levels' you are not talking about VS Code, right?
In VS Code you can see the value of an entry after expanding one level for small Maps (< 100) and two expands for any larger Map:

2016-07-21_08-16-09

2016-07-21_08-24-02

I don't understand how your virtual node would improve this.

isidorn added a commit that referenced this issue Jul 22, 2016
@isidorn
Copy link
Contributor

isidorn commented Jul 22, 2016

@weinand I have pushed the changes on the vscode side and I think it is in a good shape. I tried using it with the node adapter and I nicely get the totalCount attributes however when requesting a chunk of children I get back an empty response from the adapter. Thus forwarding this bug to you - to enable vscode to support paging just change the boolean here

@isidorn isidorn assigned weinand and unassigned isidorn Jul 22, 2016
@egamma egamma mentioned this issue Jul 22, 2016
89 tasks
@weinand
Copy link
Contributor Author

weinand commented Jul 22, 2016

@isidorn I have changed the property name to indexedVariables and I think we should enable this feature for July so that it can be adopted by debug adapters easily (I've already pushed this change so that it will become available in the Monday build).
However, I will not enable this feature in node-debug because we've already identified some limitations which would cripple node-debug (I've created issue #9670 to track this).
To make testing possible, I've added an (unofficial) launch config flag frontendVariablePaging to enable variable paging in node-debug.

@weinand weinand closed this as completed Jul 22, 2016
@weinand weinand added this to the July 2016 milestone Jul 22, 2016
@isidorn isidorn mentioned this issue Jul 25, 2016
2 tasks
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants