Skip to content

RenderFlex overflow on Debugger screen #4917

Closed

Description

@kenzieschmoll

Screenshot 2022-12-09 at 10 36 32 AM

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during layout:
A RenderFlex overflowed by 130 pixels on the right.

The relevant error-causing widget was:
  Row
  Row:file:///Users/kenzieschmoll/develop/devtools/packages/devtools_app/lib/src/screens/debugger/controls.dart:51:14

To inspect this widget in Flutter DevTools, visit:
http://127.0.0.1:9101/#/inspector?uri=http%3A%2F%2F127.0.0.1%3A50376%2FJfmk2APEhSQ%3D%2F.%2C&inspectorRef=inspector-0

The overflowing RenderFlex has an orientation of Axis.horizontal.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and
black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the
RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be
seen. If the content is legitimately bigger than the available space, consider clipping it with a
ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,
like a ListView.
The specific RenderFlex in question is: RenderFlex#f6a6c relayoutBoundary=up2 OVERFLOWING:
  creator: Row ← SizedBox ← DebuggingControls ← Column ← SizedBox ← Flex ← LayoutBuilder ← Split ←
    DebuggerScreenBody ← Expanded ← Column ← BannerMessages ← ⋯
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=521.3, h=32.0)
  size: Size(521.3, 32.0)
  direction: horizontal
  mainAxisAlignment: start
  mainAxisSize: max
  crossAxisAlignment: center
  textDirection: ltr
  verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: [ERROR]: A RenderFlex overflowed by 63 pixels on the right.

Activity

  1. kenzieschmoll commented on May 26, 2023

    @kenzieschmoll
    MemberAuthor
    Screenshot 2023-05-26 at 3 55 15 PM Couple things we could do here: 1. Merge the pause and resume buttons into a single button (https://github.com//issues/4924) 2. Make the stepping button group more dense 3. Reduce the font size on the exceptions dropdown - the font looks larger than the font for the rest of the actions
  2. added
    P3issues we think are valid but not important
    cost: lowLow engineering cost to implement.
    on Jul 24, 2024
  3. theprantadutta commented on May 31, 2026

    @theprantadutta
    Contributor

    Is this still happening on current master? The debugger controls have changed a fair bit since 2023 (the pause/resume buttons are a RoundedButtonGroup now), so I'd want to reproduce the overflow first before proposing anything. If it still overflows and you're open to a fix, I'm happy to take it — let me know.

  4. theprantadutta commented on Jul 3, 2026

    @theprantadutta
    Contributor

    Followed up on my question above with some data. The overflow still reproduces on current master, just at narrower widths than the 2022 screenshot — the small-mode work since then (dropping button labels below DebuggingControls.minWidth) fixed the common case, but the controls Row has no strategy once the icon-only content itself doesn't fit.

    I pumped DebuggingControls through the repo's own test harness (testWidgetsWithWindowSize + FakeServiceConnectionManager + createMockDebuggerControllerWithDefaults) at descending window widths:

    Window width Result
    1200 / 800 px no overflow
    600 px overflows by 29 px
    500 px overflows by 129 px
    400 px overflows by 229 px

    So the threshold is ~630px, which is realistic for DevTools embedded in an IDE side panel.

    If you're open to a fix, a few possible shapes — happy to implement whichever you prefer:

    1. Make the controls row horizontally scrollable below the breakpoint (no visual change otherwise, overflow becomes scroll).
    2. Add a second, tighter breakpoint where the BreakOnExceptionsControl dropdown collapses to an icon + menu (it's the widest remaining item).
    3. Both: densify first, scroll as the last resort.

    I'd also add a regression test pinning the no-overflow behavior at narrow widths.

  5. added a commit that references this issue on Aug 12, 2026
    34ddb37
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

    P3issues we think are valid but not importantcost: lowLow engineering cost to implement.devtools-debugger-screenIssues with the Debugger screenfix it fridaygood 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