Search code examples
flutterdebuggingvisual-studio-codecallstack

Multiple call stack main threads in VSCode when running debug


I'm running an android emulator with Flutter in VSCode on Windows. When I run debug the call stack runs 2 main threads. Is this abnormal? I am getting emulator connections dropouts. With other (smaller) Flutter projects it doesn't run any threads.

enter image description here


Solution

  • Are you using any background service that initialize in your main like FirebaseMessagingService? that might be the cause.

    An yes that is abnormal, it actually an open issue being discussed here https://github.com/firebase/flutterfire/issues/9964.

    enter image description here