Skip to content

Debug hover does not use AST #24520

Closed
Closed

Description

This is a current limitation of the debug hover that it does not have a full language understanding and due to that tries to find the hovered expression in the variables view. If the hovered expression is not present in the variables view or has duplicates the hover will not show anything.

To improve this the debug hover would need to have an AST understanding of the language which is a feature request and not yet on the plan.

An alternative is that a debug adapter extension can choose to evaluate expressions on hover but this has the downside of potentially mutating the state of the program without the user being aware. Currently node debug is not doing this.

Activity

  1. added
    debug
    on Apr 11, 2017
  2. added
    feature-request
    on Apr 13, 2017
  3. taradinoc commented on Mar 22, 2018

    @taradinoc

    Even just providing the source location info (as in #36000) would be incredibly helpful. The language I'm supporting uses word rules that don't fit vscode's regex (containing -, ?, ., ,), so I can't get much use out of debug hover as it is, but I could easily reuse the code I've written for other editor features to locate the expression surrounding the cursor.

  4. isidorn commented on Mar 22, 2018

    @isidorn
    Author

    We could potentially add source location to the evalaute hover request.
    fyi Andre Weinand (@weinand)

  5. cdturner commented on Jul 31, 2019

    @cdturner

    I am working with a language that has a postfix operator on identifiers to determine type, e.g.

    string$
    currently the hover in the debugger fails to return these.

    source location would be great, or a simple hover provider that lets me do the work of parsing. I'm already doing the work for the normal IHoverProvider for the language anyway, doing it for the debugger is not much extra.

  6. cdturner commented on Jul 31, 2019

    @cdturner

    Another adjust might be to allow the user to select text, and pass that in the hover. Visual Studio used to allow you to select part of an expression and use that for the lookup...

  7. weinand commented on Feb 17, 2020

    @weinand
    Contributor

    /duplicate #89084

  8. added
    *duplicate
    on Feb 17, 2020
  9. locked and limited conversation to collaborators on Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicatedebugfeature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions