debug react native 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
React-Native Standalone Debugger:
https://github.com/jhen0409/react-native-debugger/releases
Example 3: how to identify debug and release build in react native
if (__DEV__) {
console.log('I am in debug');
}