flutter / flutter/devtools

Suggestion: Show global variables in variable window

未关闭
#5,295 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
P3 screen: debugger
主要语言
Dart
星标
1.7k
派生
404
平均合并
6 天 17 小时
30 天内合并 PR
18

描述

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.

贡献指南

打开贡献指南

调研方向

从 runtime/vm/service/service.md 中 VM service protocol 的 Library 部分开始,然后跟踪 issue 中提到的变量窗口和 VmServiceInterface 入口点。检查求值框如何处理 globals,包括 Web 平台的 lazy getters;完成的要求是就如何将 globals 与 locals 分开显示并覆盖受影响的实现达成一致。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart
领域
tooling
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
32/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。