debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Implement paging for variables

Open jtpio opened this issue 6 years ago • 9 comments

At the moment the variable table will show a Too large to show contents. Max items to show: 300 message if a user decides to show a list with more than 300 entries:

image

The DAP supports startand count for the variables request, which can be using to implement paging: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Variables

jtpio avatar Mar 16 '20 11:03 jtpio

VS code currently shows the same message when defining ls = list(range(1000)):

image

jtpio avatar Mar 16 '20 12:03 jtpio

If we use a @lumino/datagrid and it supports an arbitrary number of variables, does this solve our issue or are we concerned about too much data being sent across the wire?

afshin avatar Mar 27 '20 15:03 afshin

We should probably use a streaming adapter to make sure we don't get flooded and to accommodate the paging built into the debug adapter protocol.

afshin avatar Mar 27 '20 15:03 afshin

cf. https://github.com/jupyterlab/lumino/blob/master/examples/example-datagrid/src/index.ts#L53-L105

afshin avatar Mar 27 '20 15:03 afshin

Using the streaming adapter sounds good :+1:

I quickly tried using the start and count parameters the other day, but they didn't seem to be taken into account. Maybe that's something we need to tweak on the ptvsd side.

jtpio avatar Mar 27 '20 17:03 jtpio

As a start, there could be a new test that makes use of the start and count parameters in:

https://github.com/jupyterlab/debugger/blob/master/tests/src/session.spec.ts

jtpio avatar Mar 31 '20 14:03 jtpio

There is no support for pagination, probably... https://github.com/jupyterlab/debugger/pull/415

Any suggestions?

KrzysztofSikoraCodete avatar Apr 02 '20 09:04 KrzysztofSikoraCodete

This limitation of 300 variables comes from pydev itself. debugpy, the drop-in replacement for ptvsd also vendors pydev and has the same issue.

EDIT: I opened an issue to remove it (or get the ability to set it from the outside).

JohanMabille avatar Apr 03 '20 16:04 JohanMabille

Moving to Future as the limit of 300 variables is still in debugpy / pydev.

jtpio avatar Jul 13 '20 12:07 jtpio