react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Debugger doesn't automatically reconnect when using Hermes Engine

Open GriffinSoliminiMSFT opened this issue 5 years ago • 11 comments

Problem Description

Debugger doesn't automatically reconnect when using Hermes Engine.

Steps To Reproduce

  1. Launch a RNW application (0.66) using Hermes, and connect a debugger via the Hermes Inspector.
  2. Observe that when code hits a breakpoint, execution stops and debugging information is shown.
  3. Restart the application
  4. Observe that breakpoints are now skipped, execution continues over expected breakpoints. Reconnecting a debugger to the Hermes inspector is the only way to get breakpoints working again.

Expected Results

Breakpoints/debugging continues to work / stays attached throughout application sessions, so long as metro is still running.

CLI version

6.1.0

Environment

info Fetching system and libraries information...
System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
    Memory: 107.37 GB / 127.71 GB
  Binaries:
    Node: 16.5.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 7.19.1 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.17763.0, 10.0.18362.0, 10.0.19041.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 16.11.31911.196 (Visual Studio Enterprise 2019)
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: 6.1.0 => 6.1.0
    react: 17.0.2 => 17.0.2
    react-native: 0.66.3 => 0.66.3
    react-native-windows: 0.66.0 => 0.66.0
  npmGlobalPackages:
    *react-native*: Not Found

Target Platform Version

No response

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2019

Build Configuration

Debug

Snack, code example, screenshot, or link to a repository

No response

GriffinSoliminiMSFT avatar Nov 19 '21 04:11 GriffinSoliminiMSFT

@Khalef1 @mganandraj @tudorms Should we track issues like this against the Hermes repo or here?

chrisglein avatar Nov 22 '21 19:11 chrisglein

I would prefer to track all Hermes related asks in the Hermes repo.

Having said that, part of the Hermes debugging code is living in the RNW repo, and the fix may need to be made there. If that's the case, then keeping the issue in RNW would make sense.

@mganandraj - any thoughts on where the fix will likely need to be?

Khalef1 avatar Nov 22 '21 20:11 Khalef1

The issue is in proper tracking of session I'd. This fix will most likely be in RNW glue code.

mganandraj avatar Nov 23 '21 15:11 mganandraj

@aeulitz is this on your current work list? 0.68 is in its 4th preview currently and trending towards release in the coming weeks, and this is currently marked as targeting 0.68. Just looking to set expectations.

chrisglein avatar Mar 02 '22 17:03 chrisglein

This seems like an important quality of life fix for Hermes inner loop, but we’re still not pushing that by default. Good candidate to backport to 0.68 depending on what the fix looks like.

chrisglein avatar Mar 17 '22 16:03 chrisglein

@aeulitz Can this issue be closed? Does it still need to be backported?

jonthysell avatar May 06 '22 18:05 jonthysell

@aeulitz Any updates on this?

jonthysell avatar Jun 09 '22 18:06 jonthysell

Flagging as needs attention to bring into triage conversation. Need clarity on if this issue can now be closed out, or if further action is needed.

chiaramooney avatar Jan 09 '23 19:01 chiaramooney

@aeulitz Does this need to be fixed or just backported? It sounds like on the Office side this would hold back Hermes integration.

chrisglein avatar Jan 12 '23 19:01 chrisglein

Ping @aeulitz

jonthysell avatar Jan 23 '23 18:01 jonthysell

PR was merged over a year ago. Not going to backport anything as the releases in question are outside the support window anyway. This is done as far as I can tell with https://github.com/microsoft/react-native-windows/pull/9827

chrisglein avatar Sep 07 '23 18:09 chrisglein