diff --git a/README.md b/README.md index b929fdfebf7e5..121eda1bda65c 100644 --- a/README.md +++ b/README.md @@ -83,10 +83,18 @@ You can use any IDE or code editing tool for developing on any platform. Use you 2. If you are running into issues communicating with `expensify.com.dev` (CORS, SSL, etc.), running via `ngrok` is recommended, see step 3 in **_Getting Started_** ## Debugging -1. If running on the iOS simulator `⌘D`, or `⌘M` on Android emulator will open the debugging menu. +### iOS +1. If running on the iOS simulator pressing `⌘D` will open the debugging menu. 2. This will allow you to attach a debugger in your IDE, React Developer Tools, or your browser. 3. For more information on how to attach a debugger, see [React Native Debugging Documentation](https://reactnative.dev/docs/debugging#chrome-developer-tools) +### Android +Our React Native Android app now uses the `Hermes` JS engine which requires your browser for remote debugging. These instructions are specific to Chrome since that's what the Hermes documentation provided. +1. Navigate to `chrome://inspect` +2. Use the `Configure...` button to add the Metro server address (typically `localhost:8081`, check your `Metro` output) +3. You should now see a "Hermes React Native" target with an "inspect" link which can be used to bring up a debugger. If you don't see the "inspect" link, make sure the Metro server is running. +4. You can now use the Chrome debug tools. See [React Native Debugging Hermes](https://reactnative.dev/docs/hermes#debugging-hermes-using-google-chromes-devtools) + ## Things to know or brush up on before jumping into the code 1. The major difference between React-Native and React are the [components](https://reactnative.dev/docs/components-and-apis) that are used in the `render()` method. Everything else is exactly the same. If you learn React, you've already learned 98% of React-Native. 1. The application uses [React-Router](https://reactrouter.com/native/guides/quick-start) for navigating between parts of the app. diff --git a/android/app/build.gradle b/android/app/build.gradle index d770052447332..bc4ea9c746dbc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -79,7 +79,7 @@ import com.android.build.OutputFile */ project.ext.react = [ - enableHermes: false, // clean and rebuild if changing + enableHermes: true, // clean and rebuild if changing ] project.ext.envConfigFiles = [ diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 11b025724a3f7..7dab035002a2c 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -8,3 +8,5 @@ # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: +-keep class com.facebook.hermes.unicode.** { *; } +-keep class com.facebook.jni.** { *; }