HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center

SDK Debugging for Android

This page explains the different tools to debug your APM Android integration, bypass the 6-hour batching, and change the SDK log level for your Android apps.

Debug Mode

In case you would like to view your data on the dashboard without having to wait for the SDK's default 6-hour batching period, you can simply bypass this by enabling Debug Mode, which will sync the data captured by our SDK upon closing a session and starting a new one. This can be especially helpful in case you are debugging an integration issue or simply trying out APM for the first time.

Enabling Debug Mode

Debug Mode can be enabled by running the following command via terminal:
adb shell setprop debug.instabug.apm.app YOUR_APP_PACKAGE_NAME

Disabling Debug Mode

If you would like to disable Debug Mode, simply run the following command:
adb shell setprop debug.instabug.apm.app none

📘

Please note that Debug Mode only works in debug builds and is not meant to be used in release builds.

📘

Please note that rate limiting will apply if the number of sessions exceeds 50 per hour. Once this limit is reached, you will have to wait until a full hour has elapsed in order to be able to keep using Debug Mode. Data collected during this period will not show up on your Dashboard.


Logging

APM SDK provides useful console logs in Android Studio for you to be able to have visibility on significant events that might be of interest to you. Since not all events are equal in terms of importance or relevance, you can control the level of verbosity of those logs via the following API:

// Set log level
Instabug.setSdkDebugLogsLevel(LogLevel.DEBUG);
// Set log level
Instabug.setSdkDebugLogsLevel(LogLevel.DEBUG)

The available levels are:

  • None: this will disable all APM SDK console logs.
  • Error: prints errors only, we use this level to let you know if something goes wrong.
  • Warning: displays warnings that will not necessarily lead to errors but should be addressed nonetheless.
  • Info: this is the default level and it logs information that we think is useful without being too verbose.
  • Debug: use this in case you are debugging an issue. Not recommended for production use.
  • Verbose: use this only if Debug was not enough and you need more visibility on what is going on under the hood. Similar to the Debug level, this is not meant to be used on production environments.

📘

Please note that each level displays the logs corresponding to its own level as well as all the levels above it. This means that Info also includes Warning and Error logs and so on.