Add getters to the vm_service protocol spec #52920
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
vm-service
The VM Service Protocol, both the specification and its implementation
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:
dwds is representing getters as fields instead of methods
We are working on matching the VM behavior.
dart-code is using a VM-specific way (checking if private field
_kind
on the Function object equals toGetterFunction
, which only works for VM, not dwds).https://github.com/Dart-Code/Dart-Code/blob/15ad6615d8e8c02fd4393112f9896cf3bfc3c1fe/src/debug/dart_debug_impl.ts#L1424
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.
vm_service protocol does not provide a way of easily identifying getters:
Class
does not indicate what function refs are getters:sdk/runtime/vm/service/service.md
Line 2033 in 3daa47b
If i understand correctly,
@Function
does not specify if the function is a getter either (only if it is an implicit getter):sdk/runtime/vm/service/service.md
Line 2756 in 3daa47b
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).The text was updated successfully, but these errors were encountered: