Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DanTup opened this issue Apr 27, 2020 · 6 comments
Labels
a: debugging Debugging, breakpoints, expression evaluation dependency: dart Dart team may need to help us P3 Issues that are less important to the Flutter project team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@DanTup
Copy link
Contributor

DanTup commented Apr 27, 2020

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

@TahaTesser
Copy link
Member

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

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 27, 2020
@DanTup
Copy link
Contributor Author

DanTup commented Apr 27, 2020

[✓] 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.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 27, 2020
@DanTup
Copy link
Contributor Author

DanTup commented Apr 27, 2020

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.

@aam
Copy link
Member

aam commented Apr 27, 2020

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!

@iapicca iapicca added the framework flutter/packages/flutter repository. See also f: labels. label Jul 1, 2020
@pedromassangocode pedromassangocode added tool Affects the "flutter" command-line tool. See also t: labels. passed first triage labels Sep 2, 2020
@jmagman jmagman added this to Awaiting triage in Tools - Dart and pub review via automation Sep 22, 2020
@HerrNiklasRaab
Copy link

Any update on this? Seems like easy to fix?

@goderbauer goderbauer removed the framework flutter/packages/flutter repository. See also f: labels. label Aug 30, 2022
@yanngasner
Copy link

Hi there, anything planned to fix this?
Thx!

@flutter-triage-bot flutter-triage-bot bot added the team-tool Owned by Flutter Tool team label Jul 8, 2023
@christopherfujino christopherfujino added P3 Issues that are less important to the Flutter project triaged-tool Triaged by Flutter Tool team labels Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: debugging Debugging, breakpoints, expression evaluation dependency: dart Dart team may need to help us P3 Issues that are less important to the Flutter project team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
Tools - Dart and pub review
  
Awaiting triage
Development

No branches or pull requests

10 participants