Accessing native logs
You can display the console logs for an iOS or Android app by using the following commands in a terminal while the app is running:
# For Android:
npx react-native log-android
# Or, for iOS:
npx react-native log-ios
You may also access these through Debug > Open System Log… in the iOS Simulator or by running
adb logcat "*:S" ReactNative:V ReactNativeJS:V in a terminal while an Android app is running on a device or emulator.
If you're using Expo CLI, console logs already appear in the same terminal output as the bundler.
Debugging native code
When working with native code, such as when writing native modules, you can launch the app from Android Studio or Xcode and take advantage of the native debugging features (setting up breakpoints, etc.) as you would in case of building a standard native app.