Skip to content

Debugger hover doesn't work with spread operator #252122

Closed
@roblourens

Description

@roblourens

@roblourens since you're assigned. I'm unsure if this is doable:

In Dart we have a spread operator that lays out the iterable content inside a new list or set. In the following code ... is added for the expression evaluation and it fails.

var list = [1, 2, 3]; // Hover `list`

void main() {
  var other = [ // Breakpoint here
    ...list, // Hover `list`
    ...list.another, // Hover `another`
    ... list, // Hover `list` (notice the whitespace before the variable)
    ... list.another, // Hover `another` (notice the whitespace before the variable)
  ];
}

extension _<T> on List<T> {
  List<T> get another => [];
}

We also have !. as a null-assertion operator - contrary to ?. (which I believe TypeScript also shares this syntax). In the ! case, the expression ends at the . after it and doesn't get the null-asserted variable. Say for variable!.value the expression is sent as .value.

Not sure how does VS Code handles extending the expression but I think maybe these cases could also be addressed? Or maybe give the languages a way of handling that?


Edit

Somewhat related to #238279

Originally posted by @FMorschel in #235168

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions