Skip to content

Types show differently in VSCode and DevTools #5749

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

Open
annagrin opened this issue May 3, 2023 · 3 comments
Open

Types show differently in VSCode and DevTools #5749

annagrin opened this issue May 3, 2023 · 3 comments
Labels
console component P2 important to work on, but not at the top of the work list.

Comments

@annagrin
Copy link
Contributor

annagrin commented May 3, 2023

Platforms: macos, (soon web as well, after dart-lang/webdev#2103)

VSCode

image

DevTools

image

Questions

  • Should we display types similarly in VSCode and DevTools?
  • Should we make the representation realistic, i.e. if the field is showing in DevTools/VSCode then the user can access it via expression evaluation, unless it is shown as private?
    • Currently 0.runtimeType.name field is not accessible (does not compile) but shows in DevTools
    • Currently (0,1).runtimeType.$1 is not accessible (does not compile) but shows in VSCode

Related: dart-lang/webdev#2103

@annagrin
Copy link
Contributor Author

annagrin commented May 3, 2023

/cc @bkonyi @nshahan @elliette @DanTup

@elliette
Copy link
Member

elliette commented May 3, 2023

@helin24 is currently working on having DevTools use the Debug Adapter Protocol (https://microsoft.github.io/debug-adapter-protocol/) which will ensure the representation of objects is consistent across DevTools and VS Code. The inconsistencies seen here will be handled by that work.

@annagrin
Copy link
Contributor Author

annagrin commented May 4, 2023

@elliette thanks! That would resolve question 1. Another question I had was whether we would like the type representation to be realistic:

  • Should we make the representation realistic, i.e. if the field is showing in DevTools/VSCode then the user can access it via expression evaluation, unless it is shown as private?
    • Currently 0.runtimeType.name field is not accessible (does not compile) but shows in DevTools

/cc @bkonyi

@kenzieschmoll kenzieschmoll added P2 important to work on, but not at the top of the work list. and removed P4 labels Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console component P2 important to work on, but not at the top of the work list.
Projects
None yet
Development

No branches or pull requests

3 participants