c957483693
Closes https://github.com/dart-lang/sdk/issues/60109 Both getClassMetadata and getClassesInLibrary can be called before main is called. In order to support this, libraries should be initialized so that these debugger APIs can inspect them. Similarly, SDK libraries that are needed before any code can run should be initialized. In order to support this, they are initialized on the first initializeAndLinkLibrary call and reinitialized during a hotRestart (since the libraries are recreated). Tests are added to evaluate these methods before main is called. The debugger test helpers are amended to: - Support breakpoints within the bootstrap script. This is done by caching the script and querying to see if it has the breakpoint if the input sources do not. - Refactor shared test expectation logic. - Remove an unused method. Change-Id: I5534d7008436a51243cf51dba01bb8ad06adca69 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410602 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com>