webdev icon indicating copy to clipboard operation
webdev copied to clipboard

`Library` response always returns empty lists for top level `variables` and `functions`

Open bkonyi opened this issue 4 years ago • 3 comments

A full Library response should include references for any top-level classes, fields/variables, and functions that are included with the library. Currently dwds doesn't populate the variables and functions properties of Library.

This can be easily reproduced by requesting the Library which contains main(), which should be included in the functions list.

This blocks the program explorer work.

bkonyi avatar Oct 13 '21 16:10 bkonyi

This information will be easy to provide using debug symbols work, which is currently in progress. This work requires significant changes to DDC and dwds and therefore will take some time. Let's brainstorm on possible workarounds for this issue.

annagrin avatar Oct 19 '21 18:10 annagrin

@nshahan is this information that we should be able to retrieve now?

bkonyi avatar Jan 08 '25 18:01 bkonyi

The debug symbols project referenced above was deprioritized so that hasn't happened yet but there are no technical blockers for it in the future. AFAIK this is still a deficiency of Dart centric debugging on the web. That is, given a JavaScript object that represents a Dart library at runtime it isn't obvious what members represent entities from the Dart library.

nshahan avatar Jan 08 '25 21:01 nshahan