React Native Tools debugging fails with recent React Native 0.85 / 0.86 Android Hermes apps
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- react-native, typescript, vscode
- Domain
- devtools, mobile-dev
Research direction
Start with the README's "Attach to Hermes application" configuration and reproduce the failure using the minimal bare Android Hermes app described, comparing React Native 0.74.x with 0.85.3 and 0.86.x. Trace the attach path and breakpoint binding behavior for the reported null port and unbound breakpoints; done means VS Code attaches and binds or hits the App.tsx breakpoint on recent versions.
Written by the indexing model from the issue text.
Description
🐛 What is the bug? How can we reproduce it?
React Native Tools does not seem to work reliably with recent React Native versions, specifically RN 0.85.x and 0.86.x, when debugging a bare React Native Android Hermes app from VS Code.
We tested a minimal bare React Native Android app with a single button and a breakpoint / debugger; statement inside the button onPress handler.
The app itself builds and runs on Android emulator, Metro is running, and Hermes inspector target is visible from Metro, but VS Code debugging does not work.
Summary of what we observed
React Native 0.74.x
Debugging worked.
With React Native 0.74.x and React Native Tools 1.13.0, Hermes attach worked and breakpoints in App.tsx were hit.
React Native 0.85.3
Debugging does not work.
With React Native 0.85.3 and React Native Tools 1.13.0, the debugger attaches or appears to attach, but breakpoints become unbound and are not hit.
With React Native 0.85.3 and React Native Tools 1.14.0, the extension fails earlier with:
Cannot read properties of null (reading 'port')
This happens even with the minimal attach config from the README:
{
"name": "Attach to Hermes application",
"cwd": "${workspaceFolder}",
"type": "reactnativedirect",
"request": "attach"
}
We also tried an explicit config:
{
"name": "Attach Hermes Android",
"cwd": "${workspaceFolder}",
"type": "reactnativedirect",
"request": "attach",
"platform": "android",
"address": "localhost",
"port": 8081,
"useHermesEngine": true,
"sourceMaps": true,
"trace": "log"
}
Expected behavior
React Native Tools should attach to the running Hermes app and bind/hit breakpoints in App.tsx, like it did with RN 0.74.x.
Actual behavior
With recent RN versions:
RN 0.85.3 + React Native Tools 1.13.0: breakpoints become unbound and do not hit.
RN 0.85.3 + React Native Tools 1.14.0: attach fails with Cannot read properties of null (reading 'port').
RN 0.86.x: debugging was also not successful in our tests.
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 296
- Avg merge
- 9h 11m
- Merged PRs (30d)
- 30
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-react-native
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/vscode-react-native#2963 ·
Maintainers usually reply within 1 day
-
[Feature] Stop Expo Go installation when Quick Pick is canceledPossibly taken @erenbati claimed this 9 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/vscode-react-native#2959 ·
Maintainers usually reply within 1 day
-
enhancement follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/vscode-react-native#2951 ·
Maintainers usually reply within 1 day
-
[Feature] Expo Doctor output is lost when diagnostics failPossibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
microsoft/vscode-react-native#2957 ·
Maintainers usually reply within 1 day
-
enhancement follow-up
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/vscode-react-native#2952 ·
Maintainers usually reply within 1 day
All issues in microsoft/vscode-react-native
Similar issues
-
perf(core): getComments() runs the approved count and the comment list as two sequential queriesOpenarea/core bot:bug bot:working
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
emdash-cms/emdash#3905 · 2 comments ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 90/100
lingdojo/kana-dojo#31728 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
selective-claw: freshTailTurns=0 keeps ALL turns verbatim and summarizes none (slice(-0) === slice(0))Possibly taken @zjncs claimed this today. Opencomponent:tokenless
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
agentic-os-org/ANOLISA#6112 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rjsf-team/react-jsonschema-form#5439 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day