Skip to content

Commit

Permalink
Update hermes.md to explain debugging on Hermes
Browse files Browse the repository at this point in the history
This has been a frequently source of confusion. See facebook/hermes#48 (comment) for an example.
  • Loading branch information
Huxpro authored Dec 1, 2020
1 parent dcfcda3 commit 7794e03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/versioned_docs/version-0.63/hermes.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ $ npx react-native run-android --variant release

This will compile JavaScript to bytecode during build time which will improve your app's startup speed on device.

## Debugging Hermes using Google Chrome's DevTools
## Debugging JS on Hermes using Google Chrome's DevTools

Hermes supports the Chrome debugger by implementing the Chrome inspector protocol. This means Chrome's tools can be used to directly debug JavaScript running on Hermes, on an emulator or device.
Hermes supports the Chrome debugger by implementing the Chrome inspector protocol. This means Chrome's tools can be used to directly debug JavaScript running on Hermes, on an emulator or on a real, physical, device.

> Note that this is very different with the "Remote JS Debugging" from the In-App Developer Menu documented in the [Debugging](https://reactnative.dev/docs/debugging#debugging-using-a-custom-javascript-debugger) section, which actually runs the JS code on Chrome's V8 on your development machine (laptop or desktop).
Chrome connects to Hermes running on device via Metro, so you'll need to know where Metro is listening. Typically this will be on `localhost:8081`, but this is [configurable](https://facebook.github.io/metro/docs/configuration). When running `yarn start` the address is written to stdout on startup.

Expand Down

0 comments on commit 7794e03

Please sign in to comment.