-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.dev-compiler-evalweb-evalevaluation support on the webevaluation support on the web
Description
Issue
Superclass fields do not show in Local variables
window in the debugger.
Evaluation works fine, but local variables returned from dwds do not contain inherited fields - note that watch window and expression evaluation box evaluate b.t
but it does not appear in local variables view.
We currently use ddc runtime function sdk_utils.getFields
to get the fields of the object (this
in code below), and it does not seem to list all the inherited properties. Note the comment: // TODO(alanknight): Handle superclass fields.
:
Suggestion
- Add getting all fields functionality to the ddc runtime
- Add a more concise way for a debugger to ask for fields of an object
- If possible, it should use dart evaluation instead of js evaluation
- Can we create dart ddc runtime library that the debugger can use?
- Another option could be reflection but it seems that dart:mirrors are not supported on flutter and I am not sure it works on web: Allow using dart:mirrors flutter/flutter#1150
Related
Repro
class A {
A(this.t);
int t;
}
class B extends A {
B(this.p): super(p+1);
int p;
void foo() {
print('in foo');
}
}
void main() {
B b = B(0);
A a = A(42);
b.foo();
}
Metadata
Metadata
Assignees
Labels
area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.dev-compiler-evalweb-evalevaluation support on the webevaluation support on the web