Open Sushant-Sardeshpande opened 1 month ago
Get the following log on the metro bundler:
Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4 from /Users/sushantsardeshpande/WebstormProjects/androidRemoteDebugging/ReproducerApp/.:
None of these files exist:
FYI Remote JavaScript Debugging is deprecated, as you can see from:
https://reactnative.dev/docs/other-debugging-methods#remote-javascript-debugging-deprecated
cc @huntie
Yup, we do plan to move to Hermes and use either the Hermes or Experimental debugger. However, as of now we did face some issues with date formats that were working with JSC but not Hermes, in case we face more issues we might want to keep using JSC for some more time. In which case I think for Android, remote debugging does seem to work better than adb or Flipper, at least for me.
FYI Remote JavaScript Debugging is deprecated, as you can see from:
https://reactnative.dev/docs/other-debugging-methods#remote-javascript-debugging-deprecated
cc @huntie
Was doing some debugging, and realized that when it tried to reload it was always creating a new thread. PREFS_REMOTE_JS_DEBUG_KEY had been set but not used.
In DevSupportManagerBase.java
UiThreadUtil.runOnUiThread( () -> { mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled); handleReloadJS(); });
Added a condition over it to read for the preference before starting another thread.
if (mDevSettings.isRemoteJSDebugEnabled() != isRemoteJSDebugEnabled) { UiThreadUtil.runOnUiThread( () -> { mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled); handleReloadJS(); }); }
That seemed to do the trick for me. Not entirely sure if it would be the right way. Would appreciate if someone could confirm.
Alternately I can assign it to a DevSettings button instead. Seems like because it always causes a reload, the issue happens if the component where this is invoked from is the landing component for the app.
@cortinico Remote debugging is critical for a good developer experience and just because it is deprecated doesn't mean it should be allowed to break without a good substitute (i.e., not flipper).
Also, you guys have said "We will leave Remote JS Debugging deprecated, but not remove it until we have an full alternative ready for the community." Half of the appeal of our ecosystem are tools like the classic redux-devtools. That one tool alone has probably influenced billions of dollars of IT decisions. We had access to it, we updated, and now we don't. It's frustrating.
CC @huntie
Description
When enabling remote debugging using NativeDevSettings.setIsDebuggingRemotely(true) on Android the app keeps on restarting and eventually crashes.
Steps to reproduce
React Native Version
0.73.9
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/Sushant-Sardeshpande/androidRemoteDebugging/tree/main
Screenshots and Videos
No response