You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the standlone program in Debug mode resulted in failure to find source code for core library.
foo(u) { u.add(123); }
void main() {
foo(new List<String>());
}
I was trying to provoke a type error when crossing into corelib.
DartEditor then opened a window named: "GrowableObjectArray.ad()" with the content: Source not found.
Finding the corelib source should be easy.
I tracked this down a bit. The stack frame in question has a source location uri of "bootstrap_impl". Normally this is something like "dart:core" or "dart:coreimpl". In order to get the source, we ask the VM for all loaded libraries, look for a library with the given name, then ask the VM for the source for the library's libraryId.
There isn't any library returned with the name bootstrap_impl. If the wire protocol was changed so that the getSource command took a URI instead of a libraryId, that'd fix the issue. Or if bootstrap_impl was returned in teh list of loaded libraries. I'm not sure if that's the right solution - I don't know if this library should be exposed through the API or not.
The text was updated successfully, but these errors were encountered:
The debugger now sends a library id with each frame. The library id for GrowableObjectArray.add is 1, which refers to dart:coreimpl. You can get a list of source URLs for a library with the command getScriptURLs. If you do that for dart:coreimpl, it shows "bootstrap_impl" as the only source URL. With the library id and this URL, you can get the source code.
Be warned though that the source code for the pre-loaded libraries does not look pretty at the moment, because we re-generate the source from the token stream, and we don't know where newlines were in the original source. We will eventually do a better job in recreating the source.
If this does not solve your issue, reassign the bug back to me.
We received the following user feedback:
Running the standlone program in Debug mode resulted in failure to find source code for core library.
foo(u) { u.add(123); }
void main() {
foo(new List<String>());
}
I was trying to provoke a type error when crossing into corelib.
DartEditor then opened a window named: "GrowableObjectArray.ad()" with the content: Source not found.
Finding the corelib source should be easy.
I tracked this down a bit. The stack frame in question has a source location uri of "bootstrap_impl". Normally this is something like "dart:core" or "dart:coreimpl". In order to get the source, we ask the VM for all loaded libraries, look for a library with the given name, then ask the VM for the source for the library's libraryId.
There isn't any library returned with the name bootstrap_impl. If the wire protocol was changed so that the getSource command took a URI instead of a libraryId, that'd fix the issue. Or if bootstrap_impl was returned in teh list of loaded libraries. I'm not sure if that's the right solution - I don't know if this library should be exposed through the API or not.
The text was updated successfully, but these errors were encountered: