Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Hermes Debugger not stopping on breakpoints #250

Closed
lunaleaps opened this issue Sep 10, 2021 · 4 comments
Closed

Hermes Debugger not stopping on breakpoints #250

lunaleaps opened this issue Sep 10, 2021 · 4 comments

Comments

@lunaleaps
Copy link
Collaborator

lunaleaps commented Sep 10, 2021

Version

0.66.0-rc.2

Developer Environment

macOS, Intel,

Issue and Reproduction Steps

When attempting to set breakpoints in devtools they are not hitting but debugger statements do.

Steps to repro:

  1. npx react-native init --version 0.66.0-rc.2 MyTestProject662 and start metro npm start
  2. Follow hermes debugging steps (but click on the React Native experimental target)
  3. Set a breakpoint via devtools in App.js and see if it hits

Expected:

  • Should see debugger stop on line of breakpoint
    Actual:
  • Doesn't

Note:

  • Also reproduces on current release 0.65.1
  • Happens on both Android and iOS
@lunaleaps lunaleaps added pre-release triage Figure out right owners release-blocker and removed triage Figure out right owners labels Sep 10, 2021
@lunaleaps lunaleaps mentioned this issue Sep 10, 2021
30 tasks
@fabOnReact
Copy link

fabOnReact commented Sep 11, 2021

I made a quick investigation, but I don't know this part of the codebase. Sorry

https://github.com/facebook/react-native/tree/main/ReactCommon/hermes/inspector/chrome

- (BOOL)isRemoteDebuggingAvailable
{
  if (RCTTurboModuleEnabled()) {
    return NO;
  }
  Class jsDebuggingExecutorClass = objc_lookUpClass("RCTWebSocketExecutor");
  return (jsDebuggingExecutorClass != nil);
}

https://github.com/facebook/react-native/blob/f085e09be5a148065d286ba3950324dc9e44b7f6/React/CoreModules/RCTDevSettings.mm#L269-L276

facebook/react-native@75f2da2

  public void setRemoteJSDebugEnabled(final boolean isRemoteJSDebugEnabled) {
    if (!mIsDevSupportEnabled) {
      return;
    }


    UiThreadUtil.runOnUiThread(
        new Runnable() {
          @Override
          public void run() {
            mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled);
            handleReloadJS();
          }
        });
  }

https://github.com/facebook/react-native/blob/ef6ad1f2d65639a1d41e05a895ad21ce97192749/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java#L1033-L1046

@fkgozali
Copy link
Collaborator

@fabriziobertoglio1987 that code is for the old "Chrome debugging flow", not for Flipper debugger for Hermes

@numandev1
Copy link

numandev1 commented Sep 14, 2021

@fkgozali can we add Hermes debugging in devsetting cmd+D instead of React Native Experiment inspect?

@kelset
Copy link
Member

kelset commented Nov 18, 2021

Closing off since we are deprecating the repo - if the problem persists please open an issue either in react-native core, or the hermes repo.

@kelset kelset closed this as completed Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants