Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does xcode open when debugging Flutter projects?

Tags:

xcode

ios

flutter

I updated my phone to iOS 17 and I'm using Xcode 15. After the update, Xcode started to open automatically when I debug the flutter project. Before, we used to run Xcode ourselves if necessary, but now it runs continuously and the debug session is open on Xcode. When I close Xcode, the debug session is also closed. Unnecessary ram and resource consumption.

Why does Xcode open while debugging flutter projects now, is there any way to prevent this?

like image 572
HasimYerlikaya Avatar asked Dec 05 '25 18:12

HasimYerlikaya


1 Answers

As explained here: If your app imports iOS platform-specific libraries, then Xcode is needed to debug that portion of your code. Xcode running in the foreground is expected behaviour until Apple (hopefully) adds a missing debugging feature for iOS 17.

Flutter used to silently build your project using Xcode and then launch a debugserver on the iOS device using ios-deploy. iOS 17 no longer supports ios-deploy however, and the replacement tooling in Xcode 15 is not able to start a debugserver as required by Flutter. Apple now only allows Xcode 15 running in the foreground to start a debugserver on iOS 17 and newer. (source: Flutter issue #133465)

Debugging your app in Flutter web on the other hand doesn’t require Xcode to run, and will quickly highlight any incompatible iOS libraries.

like image 178
Benno Avatar answered Dec 07 '25 14:12

Benno