Skip to content

Specify that widget rebuilds is only available when running in debug-mode #9730

Description

@elliette

Currently when you run your app in profile-mode, the performance panel shows a disabled checkbox that makes it seem like it should be possible to "count widget builds" (see screenshot below)

In actuality, "count widget builds" relies on the trackRebuildDirtyWidgets service extension, which uses debugOnRebuildDirtyWidget. This is only available in debug-mode: https://github.com/flutter/flutter/blob/f9e809913240552c391bf31b1cfdbdf410224d8c/packages/flutter/lib/src/widgets/debug.dart#L59

Instead of "To see widget rebuilds for Flutter frames, enable CountWidgetRebuilds", we should remove the checkbox and update the text to say "Rebuild information not available for this frame. Widget rebuild counts are only available when running an app in debug-mode."

Image

Activity

  1. added
    good first issueGood issues for new contributors
    P2important to work on, but not at the top of the work list.
    on Mar 19, 2026
  2. Bingtagui404 commented on Mar 20, 2026

    @Bingtagui404

    Hi, I'd like to take this one.

    I think the issue is the Performance panel shows a disabled "Count widget builds" checkbox in profile-mode with no explanation of why it's disabled, when in fact this feature relies on trackRebuildDirtyWidgets / debugOnRebuildDirtyWidget which are only available in debug-mode.

    My plan is to remove the disabled checkbox and update the text to say "Rebuild information not available for this frame. Widget rebuild counts are only available when running an app in debug-mode." as suggested in the issue.

    Please let me know if you'd prefer a different approach.

  3. Bingtagui404 commented on Mar 20, 2026

    @Bingtagui404

    Sorry, I won't be able to work on this due to personal reasons. Feel free to reassign it to someone else.

  4. added a commit that references this issue on Apr 3, 2026
    1a35297
  5. crackedhandle commented on Apr 3, 2026

    @crackedhandle
    Contributor

    I've submitted a PR to fix this:

    After reviewing the previous PR by @Bingtagui404 (#9733), I noticed
    it was missing the test for profile mode that @elliette requested.
    My PR includes:

    • The same UI fix (profile mode detection + clear message)
    • Keeps the existing code comment that was incorrectly removed
    • Adds widget tests for both profile mode and debug mode behavior
  6. added a commit that references this issue on Apr 20, 2026
    e7dfd10
  7. enesbugrahankilic commented on Aug 30, 2026

    @enesbugrahankilic

    I'd like to take this one — will update the frame analysis UI so profile-mode no longer shows a disabled Count widget builds checkbox, and instead explain that rebuild counts are debug-mode only.

  8. added 2 commits that reference this issue on Aug 31, 2026
    b1f1521
    042bf57
  9. added a commit that references this issue on Sep 23, 2026
    bd2f846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2important to work on, but not at the top of the work list.contributions welcomeActively welcoming contributions for these high-priority issues.devtools-performance-screenIssues with the Performance screengood first issueGood issues for new contributors

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions