flutter / flutter/devtools

Inspector shows "Disconnected" after system sleep with no reconnect option, unlike Network tab which has offline/reconnect support

Offen
#9,683 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
P2 pq-sprint screen: inspector
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

## Description
When the host machine goes to sleep while a Flutter debug session is running,
the DevTools Inspector panel becomes permanently disconnected and shows
"Run a new debug session to reconnect." — requiring a full app restart.

In contrast, the **Network tab** handles this gracefully:
- Shows the same "Disconnected" state
- Offers a **"Review recent data (offline)"** button
- Reconnects automatically or with a simple tab close/reopen

## Steps to Reproduce
1. Start a Flutter debug session
2. Open DevTools → Inspector
3. Let the machine go to sleep (or manually suspend)
4. Wake the machine
5. Observe Inspector is stuck in "Disconnected" state

## Expected Behavior
Inspector should either:
- **Option A:** Auto-reconnect when the VM Service becomes available again
- **Option B:** Show a "Reconnect" or "Refresh" button (similar to how
Network tab handles disconnection)

## Actual Behavior
Inspector shows "Disconnected - Run a new debug session to reconnect."
No reconnect/refresh option is available. A full app restart is required.

## Workaround
For Network tab: close and reopen the tab in DevTools → reconnects fine
For Inspector: must stop and re-run the entire debug session

## Proposal
Add a **Reconnect / Refresh button** to the Inspector's disconnected state,
consistent with the Network tab's offline handling UX.

## Environment
[✓] Flutter (Channel stable, 3.41.4, on macOS 26.3 25D125 darwin-arm64, locale en-UZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.3)
[✓] Chrome - develop for the web
[✓] Connected device (3 available)
! Error: Browsing on the local area network for I.S.K.A.N.D.A.R. Ensure the device is unlocked and
attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die Schlaf-und-Aufwachsequenz mit einer Flutter-Debug-Sitzung zu reproduzieren, und vergleiche dann den getrennten Zustand des Inspectors mit dem Offline- und Wiederverbindungsverhalten des Network-Tabs. Verfolge den Einstiegspunkt des getrennten Zustands des Inspectors und ermittle, wie die Verfügbarkeit von VM Service erkannt wird; fertig ist die Aufgabe, wenn der Inspector sich wieder verbinden kann oder eine funktionierende reconnect- oder refresh-Aktion anbietet, ohne die App neu zu starten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart
Bereich
devtools
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.