react native debug code example
Example 1: react native debug apk
cd android && gradlew clean && cd ..
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
cd android/
gradlew assembleDebug
(or you can use for release: gradlew assembleRelease)
cd android && gradlew clean && gradlew assembleRelease
Example 2: react native debugger
$ brew update && brew cask install react-native-debugger
Example 3: react native debugger
React-Native Standalone Debugger:
https://github.com/jhen0409/react-native-debugger/releases
Example 4: how to identify debug and release build in react native
if (__DEV__) {
console.log('I am in debug');
}