Skip to content

Explain unavailable debugging for unattached Flutter apps - #10078

Merged
srawlins merged 1 commit into
flutter:masterfrom
AIlhomov:fix/unattached-flutter-debug-guidance
Nov 9, 2026
Merged

srawlins merged 1 commit into
flutter:masterfrom
AIlhomov:fix/unattached-flutter-debug-guidance

Conversation

@AIlhomov

@AIlhomov AIlhomov commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Addresses #4091.

A Flutter debug VM connected without Flutter Tools can fail expression evaluation because no compilation service is available. DevTools then infers profile mode, so a requested Debugger screen says it only supports debug builds even though the app is a debug build.

When the debug-only ext.flutter.debugAllowBanner extension is registered, show guidance to try flutter attach and reconnect. Include registered extensions still pending their first frame. Keep the existing explanation for genuine profile builds and keep unsupported screens disabled.

This addresses the current disabled-screen explanation. It does not restore expression evaluation; the historical zero-tabs layout was not reproduced on current DevTools.

Testing

  • New regression against unchanged production code: 1 failed, 13 passed. The failure is the missing attachment guidance.
  • With the fix: all 48 framework/scaffold tests passed, including debug/profile visibility and routing/scaffold controls.
  • dt presubmit --fix: passed with the repository's pinned Flutter SDK.
  • Release web build passed. The full app was also run and visually checked against a real unattached debug VM, which returned VM error 113 (No compilation service available; cannot evaluate from source).

Before and after: the disabled-screen component using a real VM connection.

Before
After

Full app verification:

DevTools connected to the debug VM

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 used AI tooling for assistance, 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 verified 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.

@AIlhomov
AIlhomov requested a review from a team as a code owner November 8, 2026 19:29
@AIlhomov
AIlhomov requested review from srawlins and removed request for a team November 8, 2026 19:29

@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 mechanism to detect when a Flutter debug app fails expression evaluation (which previously caused it to be misidentified as a profile build) and provides guidance to run "flutter attach". It updates the screen visibility check in screen.dart to verify if the debug-only debugAllowBanner service extension is available, adds a new ScreenDisabledReason enum value, includes corresponding unit tests, and updates the release notes. I have no feedback to provide as the implementation is clean and well-tested.

@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!

@srawlins
srawlins merged commit 60fb747 into flutter:master Nov 9, 2026
9 checks passed
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.

2 participants