Skip to content

Support variable paging (aka chunked arrays) #9537

Closed

Description

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

Activity

  1. added
    feature-request
    debug
    on Jul 20, 2016
  2. rozzzly commented on Jul 21, 2016

    @rozzzly

    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.

  3. weinand commented on Jul 21, 2016

    @weinand
    ContributorAuthor

    Patrick Lienau (@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.

  4. isidorn commented on Jul 22, 2016

    @isidorn

    Andre Weinand (@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

  5. weinand commented on Jul 22, 2016

    @weinand
    ContributorAuthor

    Isidor Nikolic (@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.

  6. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugfeature-request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions