What are Debug and Release Modes in Xcode? How to Check App is Running in Debug Mode?

Understand Build Configurations Better

Markus Wu
Geek Culture

--

Photo by Sigmund on Unsplash

As an iOS developer who built some numbers of apps from scratch on my own, more often than not, I spent more time testing and debugging an app than building it. One of the most useful tips I would share with junior developers would be: How to check if your app running in Debug mode or Release mode. This is exactly what we are going to learn today.

Debug vs Release Mode

First, let’s clarify on what Debug and Release mode are. When you create a new project in Xcode, it defines two build configurations, Debug and Release. By default, Debug configuration is used during development whereas the Release configuration is used for TestFlights or App Store. In other words, when you run the app on the simulators or real devices by hitting the Run button(cmd + R), your app is running with Debug configuration, aka Debug mode; when you archive and upload a build to App Store Connect, app is running in Release mode. However, this is just the default behavior. Technically, you can run apps on simulators in any mode you want. It’s also true for archiving(builds that you upload to the App Store Connect). To change build configurations for development and archiving, you can go to Product →

--

--

Markus Wu
Geek Culture

Software Engineer at Google. I enjoy coding. I like playing and watching basketball games.