Suggestion: Show global variables in variable window
- Vorherrschende Sprache
- Dart
- Sterne
- 1.7k
- Forks
- 404
- Ø Merge
- 6 T. 17 Std.
- Gemergte PRs (30 T.)
- 18
Beschreibung
Currently the vm service protocol exposes globals per library in https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#library
We have an occasional ask from customers for exposing global variables for inspection in dart DevTools. Would it be possible to add them to the variable window (and separate globals and locals into different groups)?
VM service implementations currently support evaluation of globals (that are available in the current scope) in the evaluation box, so it seems feasible to show globals upfront.
Note: might need additional support from implementations of VmServiceInterface. On web platform, for example, globals are lazily in created in JavaScript and will require calling a getter. In this case we could show a `...` next to a global name and call the getter on click.
Beitragsleitfaden
Rechercherichtung
Start with the VM service protocol's Library section in runtime/vm/service/service.md, then trace the variable window and VmServiceInterface entry points mentioned in the issue. Check how the evaluation box handles globals, including the web platform's lazy getters; done would require an agreed approach for showing globals separately from locals and covering the affected implementations.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- dart
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 32/100