Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakpoints only work for a while when direct debugging the Hermes JS engine #13312

Open
Tracked by #12982
gabor-seres-sap opened this issue Jun 7, 2024 · 2 comments

Comments

@gabor-seres-sap
Copy link

Problem Description

We as an SAP development team want to upgrade React Native Windows from 0.71.37 to 0.71.46. After we’ve done, we faced Hermes direct debugging issue:

  • Breakpoints hit and stop the execution just for a while
  • Breakpoints are later disabled, and warning sign indicates that they are no longer available

image

Steps To Reproduce

  1. Create a RNW app based on the default template.
    Create a 0.71.46 React Native Windows app with C# and Hermes usage then run it in Debug:

npx [email protected] init "RNW_71_46" --version "0.71.19"
cd RNW_71_46
npx react-native-windows-init --overwrite --version "0.71.46" --language "cs" --useHermes
npx react-native run-windows

  1. Enable direct debugging through developer menu

  2. Direct debug RNW app using Hermes JS engine with VS Code (1.89.1) using the React Native Tools extension (v1.13.0), according to https://github.com/microsoft/react-native-windows-samples/blob/main/docs/debugging-javascript.md#using-visual-studio-code-with-the-react-native-tools-1

Option B: Attach VS Code to Metro that's already running

  1. Add and remove breakpoints several times during the debugging session

Another variant for this issue is when the execution stops at non-existent breakpoints that we removed earlier:

image

RNW 0.71.46 introduced 0.1.21 version of Microsoft.JavaScript.Hermes NuGet package: https://www.nuget.org/packages/Microsoft.JavaScript.Hermes/0.1.21

Expected Results

We need debugging experience like we had before using RNW 0.71.37 which includes ReactNative.Hermes.Windows NuGet package: https://www.nuget.org/packages/ReactNative.Hermes.Windows/

CLI version

10.2.7

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz
    Memory: 31.96 GB / 63.71 GB
  Binaries:
    Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.19041.0, 10.0.22000.0, 10.0.22621.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 17.10.34928.147 (Visual Studio Enterprise 2022), 17.4.34729.48 (Visual Studio Enterprise 2022), 17.6.34302.98 (Visual Studio Enterprise 2022)
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.19 => 0.71.19
    react-native-windows: 0.71.46 => 0.71.46
  npmGlobalPackages:
    *react-native*: Not Found

Community Modules

Target Platform Version

10.0.19041

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

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

No response

@chrisglein
Copy link
Member

We're tracking issues with Hermes debugging here: #12982
I'll add this to the tracking list.
You're on a version that's outside the support window, although for this issue in particular it may exist on latest (0.74).

@chrisglein chrisglein added the Needs: Verify on Latest Version Issue needs to be reproduced on a newer version (label drives bot activity) label Jun 10, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Jun 10, 2024
@chrisglein chrisglein removed the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Jun 10, 2024
@gabor-seres-sap
Copy link
Author

Hey @chrisglein, I was also able to reproduce the issue with 0.74.8

"dependencies": {
    "react": "18.2.0",
    "react-native": "0.74.1",
    "react-native-windows": "0.74.8"
  }

I assume that's because the same 0.1.21 version of Microsoft.JavaScript.Hermes NuGet package belongs to both RNW versions: https://www.nuget.org/packages/Microsoft.JavaScript.Hermes/0.1.21

@microsoft-github-policy-service microsoft-github-policy-service bot added the Invalid Triage https://github.com/microsoft/react-native-windows/wiki/Triage-Process (label applied by bot) label Jun 11, 2024
@jonthysell jonthysell added this to the Next milestone Aug 28, 2024
@jonthysell jonthysell removed Invalid Triage https://github.com/microsoft/react-native-windows/wiki/Triage-Process (label applied by bot) Needs: Verify on Latest Version Issue needs to be reproduced on a newer version (label drives bot activity) labels Aug 28, 2024
@chiaramooney chiaramooney added the Workstream: Developer Experience Support the RNW developer inner-loop. label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants