Skip to main content
Version: 5.x.x

Debugging

Debugging the BlueStack SDK involves configuring and testing to ensure a smooth development experience. Enabling debug mode will provide detailed logs for the BlueStack SDK and all of it's adapters for easy troubleshooting.

For deeper insights, use tools like logcat for real-time debugging. Check network configurations to address connectivity issues and monitor SDK events for performance metrics. For specific issues, refer to error codes provided in the SDK documentation.

Enable Debug Mode

To enable debug, you must first register your device as a Test Device in the BlueStack Console. Select Inventory > Your App > Test Devices and press the New + button to add a device. img.png

Enter any name for the device that your adding, and it's corresponding IDFA (iOS) or GAID (Android). The device is now registered as a test device and debug mode is automatically enabled . img.png

It might take a few minutes before the changes are fully propagated to the SDK, alternatively you can also enable the debug mode programmatically:

BlueStack.INSTANCE.setDebugModeEnabled(true);

Open Debug Screen

Once Debugging has been enabled, you can simply bring up the debug menu by checking your device from left to right. It will present you with a set of buttons, one of which will allow you to clear any local caching from the SDK (config, ads, etc)

Open the debug menu
Network InfomationDebug placements
On the Mediation settings page you'll be able to see which adapaters have been properly actived. If they indicated a cross they either have been misconfigured, not installed, or perhaps another issue that might have traces of debug information in the debug logs.The Debug SDK also allows you to inspect the last 3 ad requests made. You'll be able to see the response status for all the networks that have been activated on the placement. The passed Request Options will also be visible for inspection.
Check enabled networksDebug Placements

Generating APK with Support for Network Proxying

The Azerion team may request a debuggable APK that can proxy it's traffic by using Android's Network Security Config.

In order to generate such an APK you need to do the following:

  1. Make sure the following XML file is available: res/xml/network_security_config.xml with this content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
  1. Add the following android attribute configuration to the application element your AndroidManifest.xml:
<manifest>
<application android:networkSecurityConfig="@xml/network_security_config">
...
</application>
</manifest>
  1. Generate an APK with the debug configuration
danger

Please make sure that builds such as the one above never end up in a production environment, these configurations are for Testing purposes only!