Skip to content

Show more detailed Flutter build progress #4938

Description

@Number-3434

The Issue

Currently, you are only told when an application has finished building.


Describe the solution you'd like

It would be much more useful to see the current build progress (like in Xcode).

IMG_4598


Additional context

Ideally, this should also show the build phase, and the current completion (e.g. Building: 73% - 27 / 37)

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Jan 14, 2024
  2. DanTup commented on Jan 15, 2024

    @DanTup
    Member

    Not currently on Mac, but it seems like we might have a bug here with some progress not showing up. If I run

    flutter run --machine -d windows
    

    In the output I see some output like:

    [{"event":"app.progress","params":{"appId":"a559c391-9f0b-4e8a-9bf4-fe6e70cd85ca","id":"0","progressId":null,"message":"Building Windows application...","finished":false}}]
    [{"event":"app.progress","params":{"appId":"a559c391-9f0b-4e8a-9bf4-fe6e70cd85ca","id":"0","progressId":null,"finished":true}}]
    

    I suspect the same might be true on Mac. However, this output does not seem to show up in either the notification toast or the Debug Console. First job is fixing that. If it's still not enough progress, we might need changes in Flutter to report more detailed progress.

  3. added
    in flutterRelates to running Flutter apps
    in debuggingRelates to the debug adapter or process of running debug sessions
    on Jan 15, 2024
  4. added this to the v3.82.0 milestone on Jan 15, 2024
  5. changed the title [-]Show Xcode Build Progress[/-] [+]Show more detailed Flutter build progress[/+] on Jan 15, 2024
  6. Number-3434 commented on Jan 15, 2024

    @Number-3434
    Author

    Where would this show up?

    Would it be in the Debug Console (preferably), or only in the terminal?

  7. DanTup commented on Jan 15, 2024

    @DanTup
    Member

    When this issue is fixed, the output should be visible in the Debug Console (and possibly the toast notification during builds).

    I was using the terminal with the --machine flag to see what output the flutter tool is producing (since the IDE support is essentially using flutter run --machine). It turns out Flutter is producing more output than we are showing in VS Code (in the Debug Console/toasts) so we should wire this up better so it's visible.

  8. Number-3434 commented on Jan 15, 2024

    @Number-3434
    Author

    Would this work if you used the Run and Debug button in VSCode instead of the command-line?
    I'm using Run and Debug, and use the Debug Console instead of the Terminal.

  9. DanTup commented on Jan 15, 2024

    @DanTup
    Member

    Yes, that's exactly the case that needs fixing :)

    I was only using the terminal as a way for testing the output - the bug here (and the fix) is unrelated to the terminal. The debugger (when you click Run or Debug) internally runs flutter run --machine so it's a good way to verify what output we should be getting. In this case, there are some app.progress events that are not being handled (they should be parsed by the debugger and then written to the Debug Console).

  10. Number-3434 commented on Jan 15, 2024

    @Number-3434
    Author

    Yes, that's exactly the case that needs fixing :)

    Got it, thanks for the clarification ;)

  11. DanTup commented on Jan 30, 2024

    @DanTup
    Member

    Turns out we weren't forwarding these events from the debug adapter to the client so the fix is actually in Flutter. I've opened flutter/flutter#142524 and once merged the fix will ship in a future Flutter SDK release.

  12. Number-3434 commented on Jan 30, 2024

    @Number-3434
    Author

    Turns out we weren't forwarding these events from the debug adapter to the client so the fix is actually in Flutter. I've opened flutter/flutter#142524 and once merged the fix will ship in a future Flutter SDK release.

    Okay, thanks

  13. Number-3434 commented on Feb 17, 2024

    @Number-3434
    Author

    Yay 😃 !

  14. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Feb 22, 2024
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

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions