Repository navigation
During hot-restart, wait to run main when pause_isolates_on_start is true - #2378
Conversation
main
mainmain when pause_isolates_on_start is true
main when pause_isolates_on_start is truemain when pause_isolates_on_start is true (webdev, g3)
main when pause_isolates_on_start is true (webdev, g3)main when pause_isolates_on_start is true
main when pause_isolates_on_start is truemain when pause_isolates_on_start is true
main when pause_isolates_on_start is truemain when pause_isolates_on_start is true
Currently it is used by the expression compiler tests on the ddc test configurations in the SDK and it is also used by the benchmarking infra when running code with DDC. There is a very minor test in the SDK that runs on the We will be adding more configs and tests in the near future though. |
nshahan
left a comment
There was a problem hiding this comment.
Thanks again work walking me through these changes. LGTM but we will need to revisit in the future to reduce the size of the window between clearing breakpoints and resetting them when were ready to support a stateful hot reload.
During a hot-restart, if
pause_isolates_on_startistrue, DWDS waits for a call toresumebefore running the app's main method. This gives the debugging client time to re-set any breakpoints before the app is run.When using
RequireStrategy(flutter, webdev):dwds/web/reloader/require_restarter.dartwaits for thereadyToRunMainfuture before calling themainmethodWhen using
DdcStrategy(g3):readyToRunMainfuture is converted to a promise and passed topkg/dev_compiler/lib/js/ddc/ddc_module_loader.js(externally, different script internally), which then waits for it to resolve before calling themainmethodWork towards flutter/devtools#7231