'Viewing console logs on react-native Android release build

I'm currently facing an issue which only exists in production/release build for Android. Is it possible to run debugger or view logs for production/release builds?



Solution 1:[1]

Try the following:

Run the logger for android using the following:

npx react-native log-android

Then run your app in release mode:

npx react-native run-android --variant=release

All of your console.log() and console.warn() should be displayed.

Solution 2:[2]

Use console.log, console.warn, etc.

You can try simply run the following to see logs in the console:

react-native log-ios
react-native log-android

Reference: https://stackoverflow.com/a/38056698/9877424

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Iqbal Morshed
Solution 2 Md. Robi Ullah