Skip to content

Fix disconnect reconnect#9878

Open
khanak0509 wants to merge 7 commits into
flutter:masterfrom
khanak0509:fix-disconnect-reconnect
Open

Fix disconnect reconnect#9878
khanak0509 wants to merge 7 commits into
flutter:masterfrom
khanak0509:fix-disconnect-reconnect

Conversation

@khanak0509

Copy link
Copy Markdown
Contributor

Fixes #9838

This PR fixes issue #9838 where the DevTools Inspector was getting stuck disconnected after the Mac went to sleep and woke back up, like it just showed a dead Run a new debug session to reconnect message with no actual way to reconnect, even though the app was still running fine the whole time.

I added a Reconnect button to the disconnected overlay that reuses the last known VM service URI to reconnect, so you don't have to restart your whole debug session just because your laptop slept

issue.mov

Pre-launch Checklist

General checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I updated/added relevant documentation (doc comments with ///).

Issues checklist

Tests checklist

  • I added new tests to check the change I am making...
  • OR there is a reason for not adding tests, which I explained in the PR description.

AI-tooling checklist

  • I did not use any AI tooling in creating this PR.
  • OR I did use AI tooling, and...
    • I read the AI contributions guidelines and agree to follow them.
    • I reviewed all AI-generated code before opening this PR.
    • I understand and am able to discuss the code in this PR.
    • I have verifed the accuracy of any AI-generated text included in the PR description.
    • I commit to verifying the accuracy of any AI-generated code or text that I upload in response to review comments.

Feature-change checklist

  • This PR does not change the DevTools UI or behavior and...
    • I added the release-notes-not-required label or left a comment requesting the label be added.
  • OR this PR does change the DevTools UI or behavior and...
    • I added an entry to packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.
    • I included before/after screenshots and/or a GIF demo of the new UI to my PR description.
    • I ran the DevTools app locally to manually verify my changes.

build.yaml badge

If you need help, consider asking for help on Discord.

@khanak0509 khanak0509 requested a review from a team as a code owner July 2, 2026 20:21
@khanak0509 khanak0509 requested review from srawlins and removed request for a team July 2, 2026 20:21

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a manual 'Reconnect' button to the disconnected screen in DevTools, allowing users to attempt reconnection to the last known VM service. Feedback on the changes highlights two key improvements: first, guarding the reconnection process against concurrent attempts since Dart's Future.timeout() does not cancel the underlying operation, and second, replacing the raw string 'uri' with the established named constant DevToolsQueryParams.vmServiceUriKey to comply with the repository's style guide.

Comment thread packages/devtools_app/lib/src/framework/framework_core.dart
Comment thread packages/devtools_app/lib/src/framework/observer/disconnect_observer.dart Outdated

@srawlins srawlins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@khanak0509 khanak0509 requested a review from srawlins July 2, 2026 20:43
@khanak0509 khanak0509 requested a review from srawlins July 2, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter DevTools Inspector — Disconnected After Mac Sleep

2 participants