microsoft / microsoft/language-server-protocol

Some `evaluatableExpression: Range -> { string, Range }` to know what expression is evaluable at a given location

Open
#1,596 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request new request
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

The story is: assuming I have a piece of JS code myObject.myProperty, I want that when hovering on myProperty, the debugger gets a change to evaluate myObject.myProperty.
And yes, on 2nd thought, it seems related to LSP more than DAP.

This is a followup of https://github.com/microsoft/debug-adapter-protocol/issues/343#issuecomment-1327899425 , it looks like the Debug Adapter Protocol actually doesn't know anything about the language, just like the client. So in general the Debug Adapter won't be capable of expanding a position or a selection to the right expression to resolve.
Inferring the evaluatable expression requires knowledge of the language, requires the AST. So LSP should be the brick capable of providing it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Debug Adapter Protocol discussion and the surrounding comments on this issue. Determine whether the Language Server Protocol should define an evaluatable-expression capability, and what its input, output, and completion criteria would be; the issue currently does not identify files or tests.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.