IntelliJ IDEA 2021.2: Can't attach Flutter debugger to iOS device/simulator

Answered

Hi,

I'm using IntelliJ IDEA 2021.2 (Ultimate Edition) on macOS with the latest Flutter plugin (59.0.4). Because of dependency hell, I'm running a Flutter version from Channel dev, 2.5.0-1.0.pre. Now I can run my Flutter app from IntelliJ on an iOS device/simulator, but I can't attach the debugger to it. I always get this error message:

There are multiple observatory ports available.
Rerun this command with one of the following passed in as the appId:

flutter attach --app-id com.yourhomeingoodhands.mobile.yhigh
flutter attach --app-id com.yourhomeingoodhands.mobile.yhigh (2)

I can attach to it from the command line with at least one of these commands. But that ain't helping me debugging in my IDE.

I can attach the debugger to Android devices/emulators just fine.

This worked last week. But a lot has changed since then: From Flutter 1.x to Flutter 2.5, IntelliJ upgraded, Flutter plugin upgraded.

So, how do I fix this?

Here's my configuration:

  • IntelliJ IDEA 2021.2 (Ultimate Edition)
  • Build #IU-212.4746.92, built on July 27, 2021
  • Runtime version: 11.0.11+9-b1504.13 x86_64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • macOS 11.5.1
  • GC: ParNew, ConcurrentMarkSweep
  • Memory: 6060M
  • Cores: 12
  • Registry: ide.mac.alt.mnemonic.without.ctrl=false, debugger.watches.in.variables=false, ide.allow.merge.buttons=false, ide.balloon.shadow.size=0
  • Non-Bundled Plugins: Dart (212.4746.57), io.flutter (59.0.4)
  • Kotlin: 212-1.5.10-release-IJ4746.92
0
2 comments
Hello,
 
I'd recommend you raise this issue at https://github.com/flutter/flutter-intellij/issues since the Flutter plugin is not developed by JetBrains.
 
Please see similar discussions:
 
 
0

Belated "Thank you" to Egor Klepikov for fixing my problem! I really should have done the search myself. 😞

Adding --app-id com.yourhomeingoodhands.mobile.yhigh in the "Additional attach args" field of the "Run/Debug Configuration" made the problem go away. I left a comment on one of the bugs.

0

Please sign in to leave a comment.