jhen0409 / react-native-debugger

The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools
MIT License
10.36k stars 809 forks source link

Expo SDK48 Debugging #754

Closed poinch closed 1 year ago

poinch commented 1 year ago

React Native Debugger app version: v0.13.0 latest React Native version: 0.69.6 Platform: Android Is real device of platform: No Operating System: Windows

I'm wondering why after the update to Expo SDK48 with hermes engine i'm not able to debug the cose anymore using RND. It's someone working on it?

AsyncArtisan commented 1 year ago

I had the same issue and for other reasons i went with a dev build, and since i had sdk48, remote debugger was not an option, i tried to downgrade to sdk47, then the reanimated library didn't work and i read in expo doc that even if it did, it wont work with remote debugger. Since i needed that reanimated library, i went back to sdk48 and for some reason, now i have remote debugger option in app dev menu and just confirmed that react native debugger fully works. Go with a dev build and see if it works for you.

That's my 2cents that i still cant make sense of.

poinch commented 1 year ago

So maybe I should update from 46 to 47 and then 48! I’ll try

AsyncArtisan commented 1 year ago

So maybe I should update from 46 to 47 and then 48! I’ll try

Try 47 first, but be aware that you might be using a library or a package that makes you lose the ability to use remote debugger depending on the engine your app is running on. So check expo docs for anything that might be the cause.

mononoke-choi commented 1 year ago

after upgrading to sdk 48 or initializing expo 48 app by yarn create expo-app --template blank@beta, i can't use rndebugger..!

aballister commented 1 year ago

Same

knighthedspi commented 1 year ago

me either, I cannot use remote debugging mode anymore.

cdlarson91 commented 1 year ago

Same. Worked fine with Expo SDK 46 but now remote debugging does not appear available in SDK 48, so I can't figure out how to use React Native Debugger.

cdlarson91 commented 1 year ago

Seems to be a known and intentional action per the Expo docs. See the following:

https://docs.expo.dev/guides/using-hermes/#can-i-use-remote-debugging-with-hermes

which says, "Hermes supports Chrome DevTools Protocol to debug JavaScript in place by connecting to the running engine on the device. This enables you to debug your app even when using JSI modules. This debugging technique is superior to remote debugging and replaces it for apps using Hermes."

The link above includes information for a workaround (i.e. switching away from the Hermes engine).

about-coding commented 1 year ago

Same for me. After upgrading to 48 SDK RND didn't work anymore.

I managed to run it again for iOS by adding following config to my app.json:

"jsEngine": "hermes",
"ios": {
   "jsEngine": "jsc",
   "supportsTablet": true
},

Important: Then start your app with npx expo start --localhost. It only worked after adding the --localhost flag

poinch commented 1 year ago

I can confirm that adding "jsEngine": "jsc" in the app.json under "android" and "ios" RND will start working again. If doesn't work at first, just relaunch the project shake your device and click the OPEN JS DEBUGGER

aleksandarbos commented 1 year ago

when switching to jsc engine, i get:

No compatible apps connected. JavaScript Debugging can only be used with the Hermes engine. Learn more: https://docs.expo.dev/guides/using-hermes/

i'm trying to connect react native debugger to expo and based on the documentation provided in: https://docs.expo.dev/debugging/tools/

[Startup](https://docs.expo.dev/debugging/tools/#startup)
After firing up React Native Debugger, you'll need to specify the port (shortcuts: Cmd ⌘ + t on macOS, Ctrl + t on Linux/Windows) to 19000 (if you use SDK <= 39, the port should be 19001>). After that, run your project with npx expo start, and select Debug remote JS from the Developer Menu. The debugger should automatically connect.

any updates on this? thanks

Bohdan100 commented 1 year ago

I also solved my problem by adding: "jsEngine": "hermes", "ios": { "jsEngine": "jsc", "supportsTablet": true }, + expo start --localhost As it stated in this conversation above, thanks.

HughBerryman commented 1 year ago

doesn't work for me sadly. open js debugger option disappears when I update the app.json to the above recs

ser-emejia commented 11 months ago

doesn't work for me sadly. open js debugger option disappears when I update the app.json to the above recs

Same here, any solutions?

aleksandarbos commented 11 months ago

It looks like the expo is shifting away from jsc

Remote debugging for JSC is disabled in Expo Go and expo-dev-client. JSC remote debugging never worked particularly well compared to debugging with Hermes, and it has become unreliable over time. For more context, refer to this pull request to React Native, which will be included in their next release

src https://blog.expo.dev/expo-sdk-49-c6d398cdf740

saintyusuf commented 7 months ago

Same for me. After upgrading to 48 SDK RND didn't work anymore.

I managed to run it again for iOS by adding following config to my app.json:

"jsEngine": "hermes",
"ios": {
   "jsEngine": "jsc",
   "supportsTablet": true
},

Important: Then start your app with npx expo start --localhost. It only worked after adding the --localhost flag

i did the same but it gives an arror like down below: No apps connected. Sending "devMenu" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.