-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
Description
When I connect to the app from an IDE and set breakpoints, they aren't hit on page refresh.
Skimming through dev_handler.dart I suspect that the issue is here:
webdev/dwds/lib/src/handlers/dev_handler.dart
Lines 639 to 647 in c820e2a
| // We can take over a connection if there is no connectedInstanceId (this | |
| // means the client completely disconnected), or if the existing | |
| // AppConnection is in the KeepAlive state (this means it disconnected but | |
| // is still waiting for a possible reconnect - this happens during a page | |
| // reload). | |
| final canReconnect = | |
| services != null && | |
| (services.connectedInstanceId == null || | |
| existingConnection?.isInKeepAlivePeriod == true); |
canReconnect evaluates to false, because services.connectedInstanceId isn't null and the existing connection is not in keep alive period.
I started looking at how / when dev_handler detects disconnects, and at least for me it looks like when the page is refreshed, the sse connection is not cleared at all and _injectedConnections only grows with each refresh.
Any ideas how it worked/supposed to work?