How to get stacktrace from Flutter?

8,533

There's a Debug Console available in Visual Studio Code as per checking version 1.51.1. This can be enabled/disabled by navigating through the menu View > Debug Console. Both logs from Android emulator and iOS simulator can be displayed on the Debug Console.

However, if you're looking into checking Flutter debug logs outside of Visual Studio Code, the adb logcat command using the terminal works well for Android as previously mentioned in the comments.

On iOS, one way of checking the logs is through the Console. Press ⌘ + space and type "Console", and press Enter to launch the app. The iOS device should be displayed on the left-side pane of the Console app under Devices. Clicking on the iOS device should display its logs.

Share:
8,533
Notheros
Author by

Notheros

Updated on December 08, 2022

Comments

  • Notheros
    Notheros over 1 year

    I have a Android/iOS app developed using Flutter through Visual Studio Code. When I run it on Android >=5.0 or any version of iOS it works flawlessly, however it crashes immediately when I run it on Android 4.x (Unfortunately, app has stopped).

    I want to fix it, but Flutterdoesn't show me what is happening.

    I tried to run through VSCode pushing F5 button and also using command line flutter run, but neither shows me something that I could work with. I tried to run with trace command [Flutter trace run], but it says The --debug-port argument must be specified and I don't know what it means.

    I just need a stacktrace or a line error showing me what is the problem. Do I have to configure something on VSCode?