Skip to content

[lldb-dap] Hover on objc declarations vs expressions is different #146559

Open
@ashgti

Description

@ashgti

I'm looking into updating lldb-dap's expression request and digging into this I found some inconsistencies with how we're evaluating terms in the hover request.

Specifically, if you have some obj-c code like:

  MyType *foo = [[MyType alloc] init];
  [foo doWork];

If you hover over the declaration of foo VSCode is actually sending a hover request for *foo. If you hover over foo when its about to invoke a method, it will send a request for foo.

When we call frame.GetValueForVariablePath with the first form, its dereferencing the variable. Which is a totally valid expression, but not what I think the user meant when they hover over the variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions