Enable debug logs

Use debug logs to help you troubleshoot issues

Our SDKs (both for mobile and web) allow users to enable debug logs, which will display any potential errors with the Xtremepush integration on your connected apps (mobile apps or websites). Debug logs are very practical to troubleshoot problems. See how to enable debug logs on the different platforms.

Web-based channels

For web-based channels (web push, web inbox, onsite messages), you can easily enable debug logs from the developer tools of your browser of choice (Chrome, Opera, Firefox or Safari). Open it by pressing Option+Command+I (⌥⌘ I) on Mac or F12 or Control+Shift+I for Windows. Navigate to the Application tab. On the left section, under Storage, click on Local Storage to expand the entries, and click on your website entry. On the main section of the developer tools you will see two columns, one for key and another one for value. Enter a new key/value pair by clicking below the last entry on each column, and add: xtremepush.debug (key) and 1 (value).

Once that these entries have been added, navigate to the JavaScript Console tab. You will need to reload the page to review any possible issues which will be displayed in the Console.

📘

SDK deployment

Sometimes the SDK is not deployed directly on your website, and customers need to log in to their accounts or access a specific page. Debug logs will only show once the Xtremepush SDK has been deployed.

Mobile based channels

For mobile based channels (mobile push, mobile inbox, in-app messages), debug logs can be enabled for testing purposes in debug builds.

Android

Add the following to the PushConnector.builder:

.turnOnDebugLogs(true)

iOS

Add the following before the applicationDidFinishLaunchingWithOptionscallback to our SDK in your Application delegate:

XPush.setShouldShowDebugLogs(true)
[XPush setShouldShowDebugLogs:YES];

Mobile frameworks

// add the following within the function registerXtremePush() in your index.js file:
debugLogsEnabled: true,
// same as Android and iOS native
// Add the following within the Alloy.Globals.xtremepush.registerApp in the alloy.js file:
debugLogsEnabled: true,
// same as Android and iOS native
// Edit the AppDelegate.cs file and add the following line inside the FinishedLaunching() function:
XPush.SetSandboxModeEnabled(true);
// same as Android and iOS native
// same as Android and iOS native

🚧

Debug logs can slow down your app and should be turned off before releasing the app.