Skip to content
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

Known issues of Hermes debugging #1266

Open
RedMickey opened this issue May 6, 2020 · 9 comments
Open

Known issues of Hermes debugging #1266

RedMickey opened this issue May 6, 2020 · 9 comments
Assignees
Labels
hermes known-issues Known issues for extension, most of them are external issues

Comments

@RedMickey
Copy link
Contributor

RedMickey commented May 6, 2020

This issue continues that one #1099 in terms of debugging via js-debug extension.

The extension has experimental support for React Native Hermes debugging. At this moment we know about several issues related to Hermes debugging. Please see the list of known issues below.

The table of problems consists of two columns: the first one illustrates the problem when the extension is used for debugging an Hermes app , the second one - when Google Chrome is used for debugging an app.

If you faced new issues with React Native Hermes debugging via React Native Tools, please send them to the commentaries section of this issue.

The list of issues

  1. An application crashes when we are trying to watch content of some properties/objects on debugging. The problem is no longer reproducible on Android since React Native 0.66.0, but remains on iOS Hermes. See the issue Application crashes on debugging Map and Set objects.
Debugging using VS Code RNT Hermes debugger prototype Debugging using Chrome Resolved
iOS_hermes_map_extension iOS_hermes_map Android resolved
  1. Sometimes the debugger cannot attach to an application correctly, which makes it impossible to set a breakpoint and view application logs in the debug console. An application could crash in case of incorrect attachment (js-debug refactoring).
Debugging using VS Code RNT Hermes debugger prototype Debugging using Chrome Resolved
image
  1. Hermes engine doesn't support Runtime.callFunctionOn method. See the issue Runtime.callFunctionOn returns an empty value on debugging.

  2. [Android]:Hermes app crash when a second debugger tries to connect ([Android]:Hermes app crash when a second debugger tries to connect facebook/hermes#792)

@RedMickey RedMickey added android hermes known-issues Known issues for extension, most of them are external issues labels May 6, 2020
@EricCornelson
Copy link

EricCornelson commented Jun 2, 2020

Is №1 still happening? In the linked issue it looks like the issue is resolved on the Hermes side.

@RedMickey
Copy link
Contributor Author

@EricCornelson, we tried React Native 0.63.0-rc.1 and there the first issue still remains. We decided to wait for the next RN version and check if this issue has been fixed.

@liquidvisual
Copy link

Still seems to be an issue on React Native 0.67.3 as of 2022. Attempting to debug crashes the app on Android, where as iOS fails to connect to dev tools.

@EzioLi01
Copy link
Collaborator

EzioLi01 commented Jul 28, 2022

The no.1 issue is still existing on Chrome debugger and Flipper. Keep tracking.

@EzioLi01 EzioLi01 self-assigned this Aug 5, 2022
@EzioLi01
Copy link
Collaborator

The second issue is not repro currently.

@evelant
Copy link

evelant commented Dec 9, 2022

I have also noticed that Hermes debugging seems to fail whenever the app is reloaded. You must detach the debugger and reattach it. That makes it impossible to hit breakpoints that happen on app load.

@sjungwirth
Copy link

I'm having the issue described in https://stackoverflow.com/questions/73362632/react-native-typescript-number-0-read-as-nan where 0 is showing as NaN for variable inspection when debugging. This only started recently when updating from RN 68.x to 71.x
image

@evelant
Copy link

evelant commented Feb 6, 2024

With expo 50.0.6 and react-native 0.73.4 debugging hermes doesn't work at all. Breakpoints never bind. May not be this plugin's fault however, it seems there are a lot of bugs in hermes CDP implementation.

@evelant
Copy link

evelant commented Feb 6, 2024

Trying to set a breakpoint with verbose logging shows this

[2024-2-6 20:06:53] [Reply From Debugger To Target] {
  "id": 1030,
  "method": "Debugger.setBreakpointByUrl",
  "params": {
    "urlRegex": "file:\\/\\/\\/Users\\/imagio\\/dev\\/TaskHero\\/apps\\/taskhero\\/build\\/src\\/components\\/hero\\/HeroAvatarImage\\.js($|\\?)|\\/Users\\/imagio\\/dev\\/TaskHero\\/apps\\/taskhero\\/build\\/src\\/components\\/hero\\/HeroAvatarImage\\.js($|\\?)",
    "lineNumber": 995,
    "columnNumber": 32
  }
}

[2024-2-6 20:06:53] [Reply From Debugger To Target] {
  "id": 1031,
  "method": "Debugger.setBreakpointByUrl",
  "params": {
    "urlRegex": "file:\\/\\/\\/Users\\/imagio\\/dev\\/TaskHero\\/apps\\/taskhero\\/src\\/components\\/hero\\/HeroAvatarImage\\.tsx($|\\?)|\\/Users\\/imagio\\/dev\\/TaskHero\\/apps\\/taskhero\\/src\\/components\\/hero\\/HeroAvatarImage\\.tsx($|\\?)",
    "lineNumber": 1270,
    "columnNumber": 0
  }
}

[2024-2-6 20:06:53] [Reply From Target To Debugger] {
  "id": 1030,
  "result": {
    "breakpointId": "0",
    "locations": []
  }
}

[2024-2-6 20:06:53] [Reply From Target To Debugger] {
  "id": 1031,
  "result": {
    "breakpointId": "9",
    "locations": []
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hermes known-issues Known issues for extension, most of them are external issues
Projects
None yet
Development

No branches or pull requests

6 participants