Skip to content

Debugger expression evaluation only considers first line of multiline expressions for Flutter #55731

Closed

Description

@DanTup

If you evaluate a multi-line expression in Dart, it evaluates the whole multiline expression:

Screenshot 2020-04-27 at 12 49 43

However if you do the same thing in a Flutter app, it only evaluates the first line:

Screenshot 2020-04-27 at 12 50 28

Activity

  1. TahaTesser commented on Apr 27, 2020

    @TahaTesser
    Contributor

    Hi @DanTup
    can you please provide your flutter doctor -v?
    Thank you

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Apr 27, 2020
  3. DanTup commented on Apr 27, 2020

    @DanTup
    ContributorAuthor
    [✓] Flutter (Channel master, v1.18.0-7.0.pre.47, on Mac OS X 10.15.4 19E287, locale en-GB)
        • Flutter version 1.18.0-7.0.pre.47 at /Users/danny/Dev/Google/flutter
        • Framework revision 240611b05e (4 days ago), 2020-04-23 11:54:02 -0400
        • Engine revision feb94f6c97
        • Dart version 2.9.0 (build 2.9.0-2.0.dev 64b8ded48b)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
        • Android SDK at /Users/danny/Library/Android/sdk
        • Platform android-29, build-tools 29.0.2
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
        • All Android licenses accepted.
    
    [!] Xcode - develop for iOS and macOS (Xcode 11.4.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.4.1, Build version 11E503a
        ✗ CocoaPods not installed.
            CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
            Without CocoaPods, plugins will not work on iOS or macOS.
            For more info, see https://flutter.dev/platform-plugins
          To install:
            sudo gem install cocoapods
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 3.5)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 42.1.1
        • Dart plugin version 191.8593
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    
    [✓] VS Code (version 1.44.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.9.1
    
    [✓] Connected device (4 available)
        • iPhone 11 Pro Max • 42F08B32-ABC6-4D33-8D00-7C6D55FFC8AC • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
        • macOS             • macOS                                • darwin-x64     • Mac OS X 10.15.4 19E287
        • Web Server        • web-server                           • web-javascript • Flutter Tools
        • Chrome            • chrome                               • web-javascript • Google Chrome 81.0.4044.122
    
    ! Doctor found issues in 1 category.
    
  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Apr 27, 2020
  5. DanTup commented on Apr 27, 2020

    @DanTup
    ContributorAuthor

    I think this might related to how Flutter compiles expressions - seems like it might pass them to Dart, and Dart expects a single line for the expression:

    https://github.com/dart-lang/sdk/blob/bd3d08a891791ac3b83a55bd6652ae0b995912e9/pkg/frontend_server/lib/frontend_server.dart#L1198

    And Flutter just writes the expression as-is:

    _server.stdin.writeln(request.expression);

    I'm not super familiar with this, @aam might know if this is on the right track.

  6. aam commented on Apr 27, 2020

    @aam
    Member

    I think this might related to how Flutter compiles expressions - seems like it might pass them to Dart, and Dart expects a single line for the expression:

    Yeah, I think you are right!

  7. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jul 1, 2020
  8. HerrNiklasRaab commented on Nov 17, 2021

    @HerrNiklasRaab

    Any update on this? Seems like easy to fix?

  9. removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 30, 2022
  10. yanngasner commented on May 4, 2023

    @yanngasner

    Hi there, anything planned to fix this?
    Thx!

  11. added
    P3Issues that are less important to the Flutter project
    triaged-toolTriaged by Flutter Tool team
    on Oct 16, 2023
  12. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    team-devexpOwned by the Developer Experience team
    fyi-toolFor the attention of Flutter Tool team
    and removed
    team-toolOwned by Flutter Tool team
    P3Issues that are less important to the Flutter project
    on Jul 9, 2025
  13. github-actions commented on Aug 24, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  14. locked as resolved and limited conversation to collaborators on Aug 24, 2026
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

    a: debuggingDebugging, breakpoints, expression evaluationdependency: dartDart team may need to help usteam-devexpOwned by the Developer Experience teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions