Skip to content

Add getters to the vm_service protocol spec #52920

Description

@annagrin

Currently displays of objects are inconsistent between tools (VSCode and DevTools) and backends (VM and dwds).

The following issues prevent us from always consistently displaying objects:

  1. dwds is representing getters as fields instead of methods
    We are working on matching the VM behavior.

  2. dart-code is using a VM-specific way (checking if private field _kind on the Function object equals to GetterFunction, which only works for VM, not dwds).
    https://github.com/Dart-Code/Dart-Code/blob/15ad6615d8e8c02fd4393112f9896cf3bfc3c1fe/src/debug/dart_debug_impl.ts#L1424

  3. DevTools does not show getters on objects at all.
    We would like to eventually use dart-code logic for DevTools object display so all the debugging tools are consistent.

  4. vm_service protocol does not provide a way of easily identifying getters:

Suggestion

So solve all the issues, we would need to solve 4. first.
Define a way to identify getters in vm_service protocol so the debugger can evaluate getters if requested (for all backends).

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.vm-serviceThe VM Service Protocol, both the specification and its implementation

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions