Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDC] Provide metadata to help filter JS scopes for debugging #40774

Closed
grouma opened this issue Feb 25, 2020 · 1 comment
Closed

[DDC] Provide metadata to help filter JS scopes for debugging #40774

grouma opened this issue Feb 25, 2020 · 1 comment
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.

Comments

@grouma
Copy link
Member

grouma commented Feb 25, 2020

In package:dwds we manually filter out the two outer most scopes:
https://github.com/dart-lang/webdev/blob/446fb9d63875a765fa3704c71ed76ede61a51325/dwds/lib/src/debugging/dart_scope.dart#L23

This is brittle and can be broken given changes to the root bootstrap logic. I will soon update the logic to filter scopes until we find where the Dart SDK is defined. This will be done by looking for core and dart on a JS scope. Although a bit better, this too seems brittle.

It'd be great if DDC provided metadata to help determine if a scope should be considered for debugging.

@grouma grouma assigned annagrin and unassigned vsmenon Feb 25, 2020
@mraleph mraleph added the area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. label Feb 26, 2020
@annagrin
Copy link
Contributor

annagrin commented May 7, 2020

We can name all the library closures with some special name, detectable from the debugger, and only display the scopes that come after the scope with that name.

This requires exposing scope name in WipScope class though - see google/webkit_inspection_protocol.dart#56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
Projects
None yet
Development

No branches or pull requests

4 participants