Skip to content

Conversation

elliette
Copy link
Contributor

Follow up to #2373

The debugConnection method (in which we were listening to the pauseIsolatesOnStartStream) is actually only called from test code. 🤦‍♀️

This allows us to actually access the pause_isolates_on_start flag value in the Dwds class.

Work towards flutter/devtools#7231

@elliette elliette requested review from nshahan and Markzipan March 26, 2024 22:58
@@ -121,6 +121,9 @@ class DevHandler {
_servicesByAppId.clear();
}();

bool shouldPauseIsolatesOnStart(String appId) =>
_servicesByAppId[appId]?.chromeProxyService.pauseIsolatesOnStart ?? false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this part - when do we expect _servicesByAppId[appId] to be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_servicesByAppId[appId] is null when the debug session has been closed (which is exactly what we want, because that means shouldPauseIsolatesOnStart will return false and the code runner which calls this won't wait for a resume event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants