This is an archive of the discontinued LLVM Phabricator instance.

[lldb-vscode] Add presentation hints for scopes
ClosedPublic

Authored by werat on Nov 8 2021, 6:44 AM.

Details

Summary

Scopes can have an optional hint for how to present this scope in the UI:
https://microsoft.github.io/debug-adapter-protocol/specification#Types_Scope

The IDEs can use the hint to present the data accordingly. For example,
Visual Studio has a separate Registers window, which is populated with the
data from the scope with presentationHint: "registers".

Diff Detail

Event Timeline

werat requested review of this revision.Nov 8 2021, 6:44 AM
werat created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2021, 6:45 AM
wallace accepted this revision.Nov 8 2021, 11:14 PM

could you share a screenshot of how this looks like?

And thanks for doing this!!

This revision is now accepted and ready to land.Nov 8 2021, 11:14 PM
werat added a comment.Nov 9 2021, 2:16 AM

could you share a screenshot of how this looks like?

Sure! Here are the screenshots of before/after in Visual Studio 2022.

Before everything is in one place (in Locals Window):


After, Registers Window (marked in red -- changed since previous step):

After, Locals Window (locals are displayed directly, without "Locals" expand block):


There are no visible changes in Visual Studio Code.

Cool. I hope that vscode catches up.

Do you have push permissions or should I land this for you?

Il Mar 9 Nov 2021, 2:16 AM Andy Yankovsky via Phabricator <
reviews@reviews.llvm.org> ha scritto:

werat added a comment.

In D113400#3117500 https://reviews.llvm.org/D113400#3117500, @wallace
wrote:

could you share a screenshot of how this looks like?

Sure! Here are the screenshots of before/after in Visual Studio 2022.

Before everything is in one place (in Locals Window):
F20179455: visual-studio-before.png https://reviews.llvm.org/F20179455
After, Registers Window (marked in red -- changed since previous step):
F20179456: registers-after.png https://reviews.llvm.org/F20179456
After, Locals Window (locals are displayed directly, without "Locals"
expand block):
F20179454: locals-after.png https://reviews.llvm.org/F20179454


There are no visible changes in Visual Studio Code.

Repository:

rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION

https://reviews.llvm.org/D113400/new/

https://reviews.llvm.org/D113400

werat added a comment.Nov 9 2021, 8:49 AM

Thanks! I have push permission, will land it myself in a bit

This revision was automatically updated to reflect the committed changes.