I can't seem to figure out how to make debugging work for a native Android module invoked from a Flutter app via a Platform Channel. I'm using the sample from the Flutter documentation (https://flutter.dev/docs/development/platform-integration/platform-channels). I've tried the following:
- Open the Flutter project in IntelliJ
- Right click the android folder and select Flutter | Open Android Module in Android Studio
- Android Studio opens the native Android code.
- Set breakpoints in Android code
- Click Debug from Android Studio
- Emulator shows "Waiting for Debugger Application is waiting for deubgger to attach" while in Android Studio the debug console shows 'Connected to the target VM, address: 'localhost:8601''
- Run Flutter App from IntelliJ (I've also tried Debug from IntelliJ - flutter code will stop on breakpoints)
- The breakpoints fro the native Android code never breaks
What am I doing wrong?