Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Display IEnumerables and IDictionaries in debugger prettily (with "Raw View" available) #1634

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

Merged
andyleejordan merged 14 commits into master from JustinGrote/issue1633
Jan 24, 2022

Conversation

@JustinGrote
Copy link
Collaborator

@JustinGrote JustinGrote commented Nov 23, 2021
edited
Loading

Resolves #1633

Adds a "Raw View" expandable to the variable pane much like the C# variable provider to hide "noisy" properties of IEnumerable/IDictionary.
image

catthehacker, andyleejordan, and SeeminglyScience reacted with thumbs up emoji
@ghost ghost added Area-Debugging Issue-Enhancement A feature request (enhancement). labels Nov 23, 2021
Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome :) thanks for this! In your screen shot it shows a $true without color. Is that new with this change? or just something separate we need an issue for?

Copy link
Collaborator Author

Awesome :) thanks for this! In your screen shot it shows a $true without color. Is that new with this change? or just something separate we need an issue for?

Pretty sure that's separate, let me check without

SeeminglyScience reacted with thumbs up emoji

JustinGrote added a commit that referenced this pull request Nov 24, 2021
Copy link
Collaborator Author

Awesome :) thanks for this! In your screen shot it shows a $true without color. Is that new with this change? or just something separate we need an issue for?

Pretty sure that's separate, let me check without

Yep, it is, opened issue PowerShell/vscode-powershell#3703

SeeminglyScience reacted with thumbs up emoji

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks again!

Copy link
Member

Copy link
Member

What tests can we add to cover this @JustinGrote?

Copy link
Collaborator Author

I would say test both an ienumerable and an idictionary and verify that:

  1. The object display contains all necessary properties
  2. The "raw view" variable display contains what you would expect to see from an idictionary/ienumerable
  3. Test a derived idictionary with additional properties/methods and make sure they show up similarly under "Raw view" instead of the direct collection

JustinGrote and others added 7 commits January 23, 2022 12:46
...ariableDetails.cs
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
...ariableDetails.cs
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
...ariableDetails.cs
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
...ariableDetails.cs
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
Copy link
Collaborator Author

Other test length updates were because their "view" has changed to summarize under the "Raw View" header

Copy link
Collaborator Author

@SeeminglyScience please re-review, code has changed a little to clean up the "Raw View" header, but this is mostly net-new tests. Thanks :)

Copy link
Member

@JustinGrote I just added a commit with a couple cleanups. Namely I took out the new AssertDebuggerStoppedCommand and just made the existing AssertDebuggerStopped optionally accept a CommandBreakpointDetails, and I used the GetVariables(scope) helper I'd previously introduced to shorten your (lovely!) new tests.

@andyleejordan andyleejordan changed the title (削除) Feature: Add "Raw View" to IEnumerables and IDictionaries (削除ここまで) (追記) Display IEnumerables and IDictionaries in debugger prettily (with "Raw View" available) (追記ここまで) Jan 24, 2022
Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work Justin!

@andyleejordan andyleejordan merged commit 3ea4eb9 into master Jan 24, 2022
@andyleejordan andyleejordan deleted the JustinGrote/issue1633 branch January 24, 2022 20:41
Copy link
Collaborator Author

@andschwa thanks, I actually originally wrote it with the optional parameters but I wasn't sure if that was muddling up the original AssertDebuggerStopped with too many code paths, hence the separate function for clarity. All good though!

andyleejordan reacted with thumbs up emoji

Copy link
Member

It made sense to me cause they're all doing the same thing: asserting the debugger stopped, and then optionally asserting it stopped on the right line (or command).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@andyleejordan andyleejordan andyleejordan approved these changes

@SeeminglyScience SeeminglyScience Awaiting requested review from SeeminglyScience

Labels

Area-Debugging Issue-Enhancement A feature request (enhancement).

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

IEnumerable/IDictionary Display should be simplified

AltStyle によって変換されたページ (->オリジナル) /