-
Notifications
You must be signed in to change notification settings - Fork 240
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
Conversation
There was a problem hiding this 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?
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/VariableDetails.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/VariableDetails.cs
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/VariableDetails.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/VariableDetails.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/VariableDetails.cs
Outdated
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/DebugAdapter/Debugging/VariableDetails.cs
Outdated
Show resolved
Hide resolved
Awesome :) thanks for this! In your screen shot it shows a
$truewithout 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
Awesome :) thanks for this! In your screen shot it shows a
$truewithout 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks again!
Ditto #1636 (comment)
What tests can we add to cover this @JustinGrote?
I would say test both an ienumerable and an idictionary and verify that:
- The object display contains all necessary properties
- The "raw view" variable display contains what you would expect to see from an idictionary/ienumerable
- Test a derived idictionary with additional properties/methods and make sure they show up similarly under "Raw view" instead of the direct collection
...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>
95542b3 to
a92d9d7
Compare
Other test length updates were because their "view" has changed to summarize under the "Raw View" header
@SeeminglyScience please re-review, code has changed a little to clean up the "Raw View" header, but this is mostly net-new tests. Thanks :)
@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.
IEnumerables and IDictionaries in debugger prettily (with "Raw View" available) (追記ここまで)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work Justin!
@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!
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).
Uh oh!
There was an error while loading. Please reload this page.
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