-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to debug on Android with JSC under new version of Realm? #4364
Comments
@liamjones I suggest we move our conversation from #4363 into this issue as it seems more on topic for that.
You're right. I'll share an update on this issue as we get more clarity on when this will happen.
This is good news - as we do share the React Native teams vision for a future with Hermes being default. As per your questions on this issue.
I believe you're right and I don't know if the React Native team has any plans on adding this.
Right: Once the Hermes branch becomes our "latest" release, you'd have to pin your Realm JS version to be able to debug on Android when running your app with Hermes disabled. For contextOur legacy Chrome debugger support was tightly coupled with the JavaScriptCore APIs and wasn't using the JS engine abstraction that all our other code was using. Hence, this proved to be difficult to migrate in our efforts to target JSI. Historically our support for the legacy Chrome debugger has been less than ideal - it's been notoriously slow and its maintenance has been actively slowing us down as we've been adding new features over the years. Over all we believe the future of React Native with Hermes and a proper debugging experience through Flipper is very bright and we can't wait to finally say goodbye to our (and hopefully the entire community's) support for the legacy Chrome debugger. I suggest keeping this issue open to document the lack of support of the legacy Chrome debugger and the caveat: Releases off our |
Thanks for clarifying @kraenhansen. Yep, I totally understand the situation the Realm devs are coming from and why JSC support is being phased out.
Thanks, that'll be helpful for work prioritisation here. |
Is there any updates on this ? |
@Gnadhi We strongly recommend to try Hermes, Flipper and Realm JS v11.0.0.rc-1 or later. We do not plan to work on the Chrome debugger integration. |
Does this means that as long as we use realm, we can forget about proper debugging with any kind of IDE/Editor debugger since they all still work with Chrome JS debugging? And we're gonna have to stick with flipper without being able to make any kind of debugging with Breakpoints? |
We have released v11.0.0 with support of Hermes. You might need to add Flipper to your Android app manually: https://fbflipper.com/docs/getting-started/react-native-android/ |
@kraenhansen @kneth FYI there's an RFC raised where the RN team is planning on migrating back to Chrome dev tools being the default for debugging in future again to improve the dev debugging experience. I'm mentioning it in case your team wants to input to the RFC re anything Realm specific: react-native-community/discussions-and-proposals#641 |
@liamjones thanks for sharing this! Reading the document, I see that the proposal will still use the Chrome DevTools Protocol (CDP) and therefore JS code will still be executing on device. I.e. I would say it's incorrect to read this as the "RN team is planning on migrating back to Chrome dev tools" as their proposal is not to revert back to executing JS code in the browser. From my understanding of the proposal, any app using Realm should be compatible with the proposed debugging experience, although we might see less adoption of our realm-flipper-plugin in the future. |
Ah sorry, didn't mean to mislead. I hadn't had time to read the RFC in detail yet. Good to hear it shouldn't affect Realm. :) |
@liamjones no worries. Although we try to engage with the community and stay on top of these things ourselves, it was really good that you brought it to our attention 👍 |
Working Flipper Solution (as of Dec 7 2023)For those who are distraught about not being able to use Redux DevTools because of Realm:
|
Description
When using an Android emulator/device, if you attempt to connect to the Chrome Debugger you now get the following error message:
Error: This version of Realm JS doesn't support the legacy Chrome Debugger. Please use Flipper instead.
This makes sense if your RN app is using hermes but it's misleading if it's still on JSC as you can't use the Hermes debugger in Flipper (and I don't believe there's a JSC debugger in Flipper?)
Does this mean debugging a Realm app on Android is going to become impossible when the Hermes branch releases? For iOS, the Safari debugger is a substitute that can still be used (though isn't ideal as you lose things like the Redux Debugger which is present in the Chrome Debugger based React Native Debugger).
This is probably going to be a blocker for us upgrading Realm if the situation is still the same once the Hermes release becomes the main one. We can't risk losing the ability to debug our entire app on Android because of this (in advance of us being able to shift the app to Hermes).
Stacktrace & log output
No response
Can you reproduce a bug?
Yes, always
Reproduction Steps
No response
Version
10.20.0-beta.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
N/A
The text was updated successfully, but these errors were encountered: