Skip to content

[Debug] Allow to list variables asynchronously #135147

@testforstephen

Description

@testforstephen

Use Case:

In Java Debugger, we have added some features to display some additional information about object variables. For example, displaying info about the size of a collection, and displaying the toString value of a class that overrides the toString() method. A side effect is that these properties require some extra calculation in the debuggee to get them , and can be slow on some large objects. In particular, getting the toString value of a large object can be very slow. Currently, variable responses must be returned in a single request, and in some bad cases, the user could wait for a long time to get the variables being displayed in Variables view.

image

One idea is to support listing variables asynchronously. For example, in a Variables response, we could first return the basic variable properties and display some placeholders (e.g. loading...) for those that are not yet ready. Once the debugger gets them, use some event (e.g. refreshVariableEvent) to notify the client to refresh a node.

Metadata

Metadata

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insidersverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions