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

DAP: add the ability to hide the #class item for each object #986

Closed
wants to merge 1 commit into from

Conversation

ono-max
Copy link
Collaborator

@ono-max ono-max commented Jun 3, 2023

We can hide the #class item for each object by setting true in hideClassItem.

Closes ruby/vscode-rdbg#37.

Before

Screen Shot 2023-06-03 at 13 34 01

After

Screen Shot 2023-06-03 at 13 33 26

We can hide the #class item for each object by setting true in hideClassItem
@amomchilov
Copy link

amomchilov commented Jun 7, 2023

Perhaps there should be a special case for the most common values like:

  • true/false/nil
  • Integers
  • Floats
  • Strings

So you can have #class when it's useless, but not have it spam for all "scalar" values

@amomchilov
Copy link

I implemented this in https://github.com/ruby/debug/pull/1004/files, with a few improvements:

  1. Because of the improvements in Share variable inspection logic between CDP and DAP #1001, the implementation applies to both DAP and CDP.
  2. The bug fixes in Share variable inspection logic between CDP and DAP #1001 make the counts correct, so you don't see the disclosure triangles for items that have no members. (e.g. ⋁ a: 1 will now just be a: 1)
  3. It still keeps #class when it helps.

I would love to hear your feedback!

@ko1
Copy link
Collaborator

ko1 commented Sep 25, 2023

discuss on #1004 !

@ko1 ko1 closed this Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Ability to toggle display of #class items
3 participants