fix browser hang on hotrestart/page refresh (#2783)

When a browser reconnects (e.g., hot reload/page refresh), it gets a new `instanceId` but keeps the same `appId`. `DevHandler` correctly treats this as a new client, however, if the backend `AppDebugServices` for that `appId` was already running, `WebSocketProxyService` might have already torn down the Dart isolate and reset its `isInitialized` lock due to the previous disconnect.

**Solution**
- Updated  `_handleWebSocketConnectRequest` so that if a new browser client connects but reuses an existing backend service, we explicitly call `await _handleIsolateStart(connection)`. This recreation of the Dart isolate resolves the hang.

Fixes https://github.com/flutter/flutter/issues/178549
2 files changed
tree: 650d609c8b97f7c33683d9691b97ef92d55cfeba
  1. .github/
  2. _analysis_config/
  3. debug_extension/
  4. dwds/
  5. example/
  6. fixtures/
  7. frontend_server_client/
  8. frontend_server_common/
  9. test_common/
  10. tool/
  11. webdev/
  12. .gitattributes
  13. .gitignore
  14. AUTHORS
  15. CONTRIBUTING.md
  16. mono_repo.yaml
  17. README.md
README.md

Dart

Packages

PackageDescriptionVersion
dwdsA service that proxies between the Chrome debug protocol and the Dart VM service protocol.pub package
frontend_server_clientClient code to start and interact with the frontend_server compiler from the Dart SDK.pub package
webdevA CLI for Dart web development. Provides an easy and consistent set of features for users and tools to build and deploy web applications with Dart.pub package

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.