Variables in watch window are not evaluated when direct debug RNW apps using the Hermes JS engine #12654
Labels
Area: Debug Infrastructure
Area: Developer Experience
Area: JavaScript Engine
bug
External
Issue tracked in this repo but change will need to happen in another repo
Scenario: Visual Studio
Scenario: VSCode
Milestone
Problem Description
We as an SAP development team want to use Hermes direct debugging feature.
We have synchronous calls to native module methods so Web debugging is not an option for us.
After we upgraded from React Native Windows 0.71.37 to 0.72.24 we faced Hermes direct debugging issue:
Steps To Reproduce
npx react-native@0.72.6 init "RNW_72_24" --version "0.72.6"
cd RNW_72_24
npx react-native-windows-init --overwrite --version "0.72.24" --language "cs" --useHermes
npx react-native run-windows
OR
npx react-native@0.73.0 init "RNW_73_4" --version "0.73.0"
cd RNW_73_4
npx react-native-windows-init --overwrite --version "0.73.4" --language "cs" --useHermes
npx react-native run-windows
Enable direct debugging through developer menu
Choose one of the possible approaches below (a. b. c. or d.)
a. Direct debug RNW apps using the Hermes JS engine with Edge by using the Edge Developer Tools, according to: https://github.com/microsoft/react-native-windows-samples/blob/main/docs/debugging-javascript.md#using-the-edge-developer-tools-1
b. Direct debug RNW apps using the Hermes JS engine with VS Code's built-in Node.js debugger, according to https://github.com/microsoft/react-native-windows-samples/blob/main/docs/debugging-javascript.md#using-visual-studio-code
c. Direct debug RNW apps using the Hermes JS engine with VS Code (v1.85.2) using the React Native Tools extension (v1.12.3), 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
d. Flipper (0.239.0)
We could attach to Hermes using Flipper previously when we had RNW 0.71.37. When RNW version is 0.72.24 or 0.73.4 then React Dev Tools and Logs work fine but Hermes Debugger indicates “Metro is connected but no Hermes apps were found.”
Direct debug RNW apps using the Hermes JS engine with Visual Studio (LTSC 17.6.10) with the debugger from the Node.js development workload according to https://github.com/microsoft/react-native-windows-samples/blob/main/docs/debugging-javascript.md#using-visual-studio-hermes
The content of http://localhost:8081/json
Expected Results
When direct debug Hermes JS engine then scope variables and the watch window should be evaluated properly when breakpoints hit and stop the execution. Similar to direct debug RNW apps using the (default) Chakra JS engine with Visual Studio's built-in Script debugger which works fine using RNW 0.72.24 and 0.73.4, according to https://github.com/microsoft/react-native-windows-samples/blob/main/docs/debugging-javascript.md#using-visual-studio-chakra
CLI version
11.3.7
Environment
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
The text was updated successfully, but these errors were encountered: