Debugger doesn't automatically reconnect when using Hermes Engine
Problem Description
Debugger doesn't automatically reconnect when using Hermes Engine.
Steps To Reproduce
- Launch a RNW application (0.66) using Hermes, and connect a debugger via the Hermes Inspector.
- Observe that when code hits a breakpoint, execution stops and debugging information is shown.
- Restart the application
- 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
@Khalef1 @mganandraj @tudorms Should we track issues like this against the Hermes repo or here?
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?
The issue is in proper tracking of session I'd. This fix will most likely be in RNW glue code.
@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.
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.
@aeulitz Can this issue be closed? Does it still need to be backported?
@aeulitz Any updates on this?
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.
@aeulitz Does this need to be fixed or just backported? It sounds like on the Office side this would hold back Hermes integration.
Ping @aeulitz
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