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

Debug variables: better support for collections #307

Open
kubukoz opened this issue Oct 8, 2022 · 1 comment
Open

Debug variables: better support for collections #307

kubukoz opened this issue Oct 8, 2022 · 1 comment

Comments

@kubukoz
Copy link

kubukoz commented Oct 8, 2022

Is your feature request related to a problem? Please describe.

When you debug a program and look into a collection, you have to dig into its specific fields (which are implementation-dependent) to look at a particular element of the collection. It's not very convenient and (in some situations) may be outright impossible because of the arbitrary ordering of the elements' representation in the (deeply nested) fields.

Describe the solution you'd like

Something similar to what IntelliJ does: showing collection elements as fields. If there's a large number of them, you get a preview of a couple elements and can expand the list on demand.

Describe alternatives you've considered

Manually digging into the fields.

Additional context

IDEA's view:

image

Lazy expansion:

image

View in VS Code using Metals:

image

Maps in IDEA:

image

Maps in VS Code using Metals:

image

Search terms

debug, dap, debug adapter protocol, collections, stdlib

@adpi2
Copy link
Member

adpi2 commented Oct 10, 2022

That's an interesting feature.

In terms of implementation we could invoke toArray on the variable if its type extends Seq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants