Skip to content

Hermes support #573

Closed
Closed

Description

@Ashoat

Hey, I just wanted to check to see if there's any interest / work on Hermes support for the React Native Debugger. The React Native team's work on JSI is still in progress, but once that is launched the approach of running the JS thread remotely won't work anymore, since JSI relies on having shared memory access between the JS thread and the native thread, which isn't possible when the two threads are running on different hosts.

The way that the React Native team is looking to address this is with Hermes, their custom JS runtime. JSI works with both Hermes and JSC, but the Hermes team has implemented the Chrome inspector protocol for Hermes, which allows the Chrome debugger running on a laptop to communicate with the Hermes runtime running on a device.

It's also possible to debug Apple's JSC through Safari, which IIRC relies on a similar "remote inspection" approach. It probably won't be easy to integrate with RND though, since RND is based on the Chrome toolset.

Given that context, it seems like the best way forward for RND to work with JSI is through Hermes. The link above explains how to get the Chrome debugger working with Hermes – I'm guessing that something similar can be done to get RND working with Hermes.

Activity

  1. madandrija commented on Mar 2, 2021

    @madandrija

    If this isn't done, I'm not sure there will be any use for RND since apps crash when they touch code that uses TurboModules

  2. rusakovic commented on Aug 23, 2021

    @rusakovic

    It's the most important feature for implementing.
    All of us will be glad to see your best react native debugger with Hermes.
    Flipper - is a bull shit in comparison with your debugger!!

  3. pavermakov commented on Nov 3, 2021

    @pavermakov

    @rusakovic I'm glad I'm not the only one who can't stand flipper. Too bad flipper is now shipped and installed by default.

  4. minhchienwikipedia commented on Nov 16, 2021

    @minhchienwikipedia

    Same to me, I hope we can use RN Debugger for it, I don't want to use Flipper, it's too bad, it's hard to use, too much setup...! I hope you guys can do it ASAP, thank you guys for what you did!

  5. minhchienwikipedia commented on Nov 18, 2021

    @minhchienwikipedia

    I found it, we can use Reanimated 2 with React Native Debugger until version 2.3.0-alpha.2 (suggest using version 2.3.0-beta.2 for now) or you can wait for official version, this is only a beta version
    https://github.com/software-mansion/react-native-reanimated/releases/tag/2.3.0-alpha.2 - Added chrome debugger support

  6. msageryd commented on Dec 30, 2021

    @msageryd

    This would be awesome!
    I have had a couple of weeks with Flipper. I thought Flipper was the new way to go. I even uninstalled RND, since I couldn't run it with Hermes anyway. Flipper has some nice features, but it's soo slow. Debugging Redux actions with Flipper is a PITA.

    I have now reinstalled RND and will go back to V8 until RND supports Hermes. My thumbs up for this feature.

  7. mikeduminy commented on Jan 27, 2022

    @mikeduminy

    How would this be accomplished in theory?

  8. imisshtml commented on Feb 3, 2022

    @imisshtml

    Yes, this would be helpful. Flipper is really horrible and on my machine it takes up too much processing power.

  9. vmechiev commented on Apr 19, 2022

    @vmechiev

    I hope u will implement hermes support, guys, because I don't want to use Flipper, bcs it is difficult to configurate and not so convinient as your tool.

  10. Ashoat commented on Apr 19, 2022

    @Ashoat
    Author

    If somebody is interested in adding a Flipper plugin with support for the Redux debugger, let me know. I don't currently have the cycles to work on it, but I have pretty good context on the problem and what it would take to solve it.

  11. Nantris commented on Aug 23, 2022

    @Nantris

    This just shot to the top of my wishlist when Flipper decided it wasn't going to work on any of my machines or projects one day...

  12. klitko13 commented on Sep 22, 2022

    @klitko13

    Up

  13. alex-mironov commented on Oct 21, 2022

    @alex-mironov

    Are there any plans to make it working with Hermes? Starting from RN 0.70 it's a default option so this feature is critical.

  14. Reactor-Labs commented on Nov 2, 2022

    @Reactor-Labs

    I'm using Reactotron and Flipper and both seem to be good options

    https://github.com/infinitered/reactotron

    https://fbflipper.com/

  15. 9 remaining items

  16. jalvarson commented on Apr 5, 2023

    @jalvarson

    +1 Really need this.

  17. Nantris commented on Apr 5, 2023

    @Nantris

    To everyone saying they really need this - you probably don't. Why do you need it?

    I am not a maintainer, but I want to reiterate how exceedingly unlikely it is that this will happen. This package is currently based on a version of Electron that is 10 behind the oldest still-supported version, and integrating Hermes is a big ask when there are other comparable tools now that did not exist when this project began.

  18. davidtiede commented on Apr 6, 2023

    @davidtiede

    To everyone saying they really need this - you probably don't. Why do you need it?

    I am not a maintainer, but I want to reiterate how exceedingly unlikely it is that this will happen. This package is currently based on a version of Electron that is 10 behind the oldest still-supported version, and integrating Hermes is a big ask when there are other comparable tools now that did not exist when this project began.

    The main reason for me is that Flipper is not compatible with @react-native-firebase/app, so right out of the box I'm without a debugger. Chrome://inspect seems nothing more than a familiar console and react-devtools works fine for inspecting react components / state, but both of these tools lack a network inspector (as far as I can tell). If react-native-debugger supported Hermes, debugging network requests would be possible.

    If react-native-debugger is not needed.. how is everyone else inspecting network requests? 🧐

  19. Nantris commented on Apr 6, 2023

    @Nantris

    @davidtiede that's fair - but I wouldn't get your hopes up that this will ever happen.

    If somebody needs it, it's likely they're going to have to be the one to figure it out and submit a PR. This issue has been open for years as releases of the project become more infrequent and the maintainers have never replied to this issue.

  20. davidtiede commented on Apr 6, 2023

    @davidtiede

    @slapbox no I'm sure you're right.. It's a bit frustrating coming from the web world where DevTools are the standard, but mobile debugging seems like an after thought. I'll just console.log everything for now.

  21. Nantris commented on Apr 6, 2023

    @Nantris

    I've waited for over 3 years thinking mobile development would stop sucking any day now - but it just hasn't materialized sadly.

  22. Ashoat commented on Apr 7, 2023

    @Ashoat
    Author

    At Comm we've set up react-devtools, redux-devtools, and JS debugging via expo-dev-client without Flipper. It all works with Hermes, and we're able to fully replace all of the functionality in react-native-debugger with this stack.

    Unfortunately it does require a lot of project configuration, and we don't have the cycles right now to package it into a standalone project like react-native-debugger. That said, our codebase is open source: https://github.com/CommE2E/comm

  23. gusgard commented on May 3, 2023

    @gusgard

    I'm using react-native-debugger with Hermes and Firebase, could you try https://www.npmjs.com/package/react-native-devsettings?activeTab=readme?

    Related to: #755

  24. jaexplorer commented on May 4, 2023

    @jaexplorer

    @gusgard trying now

  25. jaexplorer commented on May 4, 2023

    @jaexplorer

    @gusgard Omg I love you this works.

  26. youwasborntodo commented on May 4, 2023

    @youwasborntodo

    I hope that 100 years later, my great-grandson will tell me during the Qingming Festival: RND can supported hermes

  27. jncampbell commented on May 21, 2023

    @jncampbell

    We could really use some communication regarding if this is on the table or not. This tool no longer works with any react native versions that use the default hermes engine. It's totally fine if support is not on the horizon but I think that should be communicated so folks can look for (or build) more future-proof solutions.

  28. Ashoat commented on May 22, 2023

    @Ashoat
    Author

    At App.js earlier this month, a Meta engineer presented an upcoming version of Metro that supports the Chrome DevTools Protocol. No guarantees on react-native-debugger support working naturally with that, but it's at least a positive development, and should unblock react-native-debugger compatibility.

    At Comm we're still using expo-dev-client for debugger support and react-devtools / redux-devtools directly. It works fine, and you can check out our repo here.

  29. jhen0409 commented on Jul 19, 2023

    @jhen0409
    Owner

    Sorry for being late, I'll close this first. I created a new discussion about this, if you want to know any news about Hermes debugger support (related JSI / Fabric / New Architecture) in RNDebugger, you can follow #774. Also, any help or advice would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions