Description
In the Dart DevTools debugger, we don’t show static fields in the expression evaluation autocomplete when connected to a web app. This is because DWDS only populates the class information with instance fields, not static fields: dwds/lib/src/debugging/classes.dart
.
The sdkUtils
that DWDS uses to fetch the instance fields is an alias DDC’s own internal runtime library. There are also methods for getting various static members ( ddc_runtime/classes.dart
), but their implementation was removed because they weren’t being used within DDC.
@nshahan is working on adding the DDC implementations back, but only including the static members’ names so as not to add too much internal bloat. Once DDC returns the names, DWDS can begin calling the sdkUtils
methods for getting static members.
Related bugs:
- There is an open bug to provide a public API for DDC so that DWDS doesn't have to depend on what is meant to be an internal-only library: [ddc] Provide a documented API for loading and interacting with a DDC compiled application sdk#46377
- There is also an open bug for DDC to provide better object metadata, which will replace all of this: [dartdevc] Provide symbol information to the debugger sdk#40273
FYI @annagrin as well.