Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger shows multiple versions of a shadowed variable in locals when running on the web #2341

Open
nshahan opened this issue Jan 12, 2024 · 0 comments
Labels
P3 A lower priority bug or feature request package:dwds

Comments

@nshahan
Copy link
Contributor

nshahan commented Jan 12, 2024

When debugging with vscode.

main() {
  var x = 40;
  if (x > 10) {
    var x = 'hello';
    if (x.isNotEmpty) {
      var x = Duration.zero;
      print(x);
    }
  }
}

Observe the local variables in the debugger pane.

VM:
Screenshot 2024-01-12 at 3 16 54 PM

Web:
Screenshot 2024-01-12 at 3 13 59 PM

Getting the shadowed variable using expression evaluation works as expected though.

@elliette elliette added the P3 A lower priority bug or feature request label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request package:dwds
Projects
None yet
Development

No branches or pull requests

2 participants