This section assumes you've followed our [Quickstart](🔗) section of our Getting Started guide to install and configure our SDK.
RevenueCat's SDK will log important information and errors to help you understand what is going on behind the scenes. You can enable more detailed debug logs with the `
logLevel` property. You can set this immediately in your app while testing, **before you configure Purchases**.
On iOS, disabling `
OS_ACTIVITY_MODE` in your Xcode scheme will block debug logs from printing in the console. If you have debug logs enabled, but don't see any output, go to `
Product -> Scheme -> Edit Scheme...` in Xcode and uncheck the `
OS_ACTIVITY_MODE` environment variable.
# Debug UI
RevenueCat's iOS 4.22.0+ and Android 6.9.2+ SDKs provide an overlay for your app that displays relevant details of the SDK configuration. The debug overlay includes each of your configured Offerings, with the option to purchase any of the products and validate access to entitlements.
You can export your configuration details in JSON format to share with RevenueCat support if you need to open a support ticket.
Note: The debug UI won't compile for release builds, so you'll need to disable the behavior before archiving for release.
In order to use the overlay, you need to include the debug view library which is available on Maven and can be included via Gradle. Currently, this is only available as a Jetpack Compose Composable.
Then, you can use it from your own `
@Composable`'s like this:
|Diagnostics||The status of your configuration based on access to the RevenueCat API with your API key|
|Configuration||SDK configuration based on your `|
|Customer Info||The configured users’ IDs as well as entitlement details|
|Offerings||Each of your configured Offerings, packages, and products. Only includes Offerings with products accessible via StoreKit. See our guide on Empty Offerings if your Offerings aren’t populating|
# Debug Logs
All logs from the SDK are prepended with "`
[Purchases]`", you can use this string as a filter in your log output to clearly see the logs that are from _Purchases_.
Emojis currently available on the following platforms:
Android version >= 4.0.2
iOS version >= 3.10.1
|Icon(s)||Log Level||Description||Required Actions|
|🍎 ‼️||Error Warn||Error/warning messages generated from Apple||View [error handling doc](🔗) if on Error level|
|🤖 ‼️||Error Warn||Error/warning messages generated from Google||View [error handling doc](🔗) if on Error level|
|📦 ‼️||Error Warn||Error/warning messages generated from Amazon||View [error handling doc](🔗) if on Error level|
|😿 ‼️||Error||Error messages generated from RevenueCat||View [error handling doc](🔗)|
|😻||Debug||Success messages generated from RevenueCat||No action required, for informational purposes.|
|😻💰||Info||RevenueCat received purchase information||No action required, for informational purposes.|
|💰||Debug||Messages related to your products||No action required, for informational purposes.|
|ℹ️||Debug Info||Messages detailing events that occur in your app cycle||No action required, for informational purposes.|
|👤||Debug||Messages related to a user's App User ID||No action required, for informational purposes.|
|⚠️||Warn||Warning messages about implementation||View log message for additional information.|
Messages that have the double red exclamation marks prefix (‼️) attached provides important information regarding your implementation and may require your attention. Paying attention to the source of the message will assist you during the development process. Be sure to address these logs before shipping your app.
## Sample Output
Below are sample logs generated when setting `
debugLogsEnabled = true`. Keep an eye out for any `
ERROR` level logs, status codes other than `
200`, or any `
Invalid Product Identifiers`.
# Debugging with Hybrids
Xcode and Android Studio are our recommended IDEs for debugging. If you are a developer who works primarily with one of our hybrid SDKs and have not encountered either before, you can follow these instructions to open your app and find the debug logs to share with RevenueCat Support or your internal team.
[Install Xcode from the App Store.](🔗). Within the main folder of your app, you should have a folder titled `
ios` that contains an Xcode project file, ending in `
.xcodeproj`. Open this with Xcode from your file finder or from Xcode itself. You should be able to build and run your app in Xcode without additional editing but if you are getting an error, check that all General and Build Settings are filled out. Your debugger output will open automatically upon building within the Xcode window, and from here you can follow the instructions above.
## Android Studio
[Install Android Studio from the Google Developers website.](🔗) You can open the main folder of your app in Android Studio either from the main menu or from your file finder. There shouldn't be any additional editing needed to build and run your app, although you most likely need to set up a [virtual Android device](🔗) when running your app for the first time. The debugging output will open automatically upon building within the Android Studio window, and from here you can follow the instructions above.
You can open your Xcode project directly from Google - to do so, right click on the `
ios` folder, hover over Flutter, and click "OpenIOS module in Xcode".
You can also run and debug your iOS project inside Android Studio itself by adding an iOS simulator and choosing it as the device before building. To do this however, you will still need Xcode installed.
Flutter projects using Swift may fail to show debug logs in the console if you are using Android Studio. We recommend running your Flutter iOS project using Xcode to view debug logs from the Purchases SDK.
If using Flutterflow or another low to no code app builder, it may not be possible for you to see debug logs. We recommend reaching out to the app builder's support team directly to help troubleshoot.
Expo apps for iOS can use Console.app on Mac to view debug logs, while Android projects are still recommended to use Android Studio. For specific help on debugging your React Native Expo project, feel free to reach out to [RevenueCat support](🔗).
# Next Steps
If you spotted any errors while debugging, make sure you're [handling errors correctly ](🔗)
You've verified that _Purchases_ is running correctly, time to start [making purchases in sandbox ](🔗)