facebook / facebook/hermes

unable to set breakpoints early in the code

Open
#597 2 comments 8 reactions 0 assignees View on GitHub
bug debugging
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Bug Description
It seems impossible to set a breakpoint to trace startup problems such as in the root index.js (or even deeper) because it appears that the Hermes Debugger (RN) doesn't seem to attach until the app has already fully started. This makes debugging certain issues almost impossible and you have to resort of console.log() statements and other nonsense.

I was told to post this bug here, previously posted in flipper: https://github.com/facebook/flipper/issues/2705

- [x] I have run `gradle clean` and confirmed this bug does not occur with JSC

Hermes version: 0.8.1
React Native version (if any): 0.65.1
OS version (if any): macOS
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): arm64-v8a

## Steps To Reproduce
1. Open Flipper with a React Native app running in an iOS simulator (probably Android too)
2. Set a breakpoint in the root `index.js`
3. Press R in the simulator or terminal to reload the application
4. Notice that your breakpoint never hits

## The Expected Behavior
I would expect to be able to set breakpoints anywhere.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.