Skip to content

No exceptions logged before runApp on iOS devices #44717

@stx

Description

@stx

Exceptions that occur before runApp() are not printed to log on iOS devices. Works in simulator.

Related: #41133

Reproduce:

void main() {
  throw Exception('an error happened here');
  runApp(MyApp());
}

Result is a frozen app and nothing in the logs.

[✓] Flutter (Channel master, v1.10.16-pre.98, on Mac OS X 10.15.1 19B88, locale en-US)
    • Flutter version 1.10.16-pre.98 at /Users/james/Development/flutter
    • Framework revision 03ac37af08 (2 hours ago), 2019-11-08 12:47:26 -0800
    • Engine revision 5f5713e339
    • Dart version 2.7.0

 
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/james/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2, Build version 11B52
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 38.2.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.40.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.6.0

[✓] Connected device (1 available)
    • Virgo • 00008030-000848D11EF0802E • ios • iOS 13.2.2

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions