R2D2
R2D2

Reputation: 1

Unable to Run outside of Debug VSCode in Flutter

I would thoroughly appreciate any help. I am unable to run Android or iOS emulator outside of the debug mode. When running the code, Dart DevTools pops up. When I try to look at the performance section it says "You are running your app in debug mode. Debug mode is not indicative of release performance. Relaunch your application with the '--profile' argument or relaunch in profile mode from VSCode or IntelliJ" I have had issues with Flutter and Dart working properly so I tried to uninstall everything then reinstall it.

  1. When putting flutter run --profile into terminal, I get the exact result underneath.
    flutter run --profile
    
    Multiple devices found:
    Android SDK built for x86 (mobile) • emulator-5554 • 
    android-x86 • Android 8.1.0 (API 27) (emulator)
    AOSP on IA Emulator (mobile)       • emulator-5556 • 
    android-x86 • Android 9 (API 28) (emulator)
    [0]: Android SDK built for x86 (emulator-5554)
    [1]: AOSP on IA Emulator (emulator-5556)
    Please choose one: [0|1]: 0
    Profile mode is not supported by Android SDK built for 
    x86.
    new@NEWs-MBP explornation05 % flutter doctor
    Doctor summary (to see all details, run flutter doctor 
    -v):
    [✓] Flutter (Channel stable, 1.20.2, on Mac OS X 
    10.15.4 19E287, locale en-US) 
    [✓] Android toolchain - develop for Android devices 
    (Android SDK version 28.0.3)
    [✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    [✓] Android Studio (version 4.0)
    [✓] IntelliJ IDEA Community Edition (version 2020.2.1)
    [✓] VS Code (version 1.48.2)
    [✓] Connected device (2 available)
    
    • No issues found!"

But there are issues.

  1. I also have tried 'flutter run --release' flutter run --release Release mode is not supported by AOSP on IA Emulator.

  2. I also have looked at the "App running on debug mode only for Flutter" question on StackOverflow App running on debug mode only for Flutter

Under the run tab, they have the option to run flutter in release mode in the picture right next to this.

Option to Run Flutter in release mode vs. The only options I am getting

  1. I have also tried to input the flutterMode: release and also flutterMode: profile on the launch.json tab in configurations, but that did not solve it either.

Still new to this thank you for your help!

Upvotes: 0

Views: 1819

Answers (1)

Omatt
Omatt

Reputation: 10519

As mentioned in the Flutter docs, it's recommend to test your app on a physical device, and consider checking performance on the slowest device that your users might reasonably use. Performance and profiling results from running the app on simulators or emulators is not a general indicator of the final behavior of release builds.

Upvotes: 0

Related Questions