skip to Main Content

I want to debug the flutter application in android-studio and Xcode with the real phone device, could i directly log the message out at these two tools when i meet the error?

2

Answers


  1. Assuming you want to debug a physical device connected to the computer(As you mentioned Android Studio and Xcode), use the print() function. It will show the logs in both Android Studio and Xcode.

    or

    import 'dart:developer' as developer;
    

    Import this and use as

    developer.log('log me', name: 'my.app.category');
    

    Check details here.

    Also, check this for dumping errors when the app suddenly stops.

    Login or Signup to reply.
  2. For android you can open terminal and execute :

    adb logcat [options]
    // make sure that adb is in PATH or you need to work on the adb folder

    look here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search