Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

React Native Tools debugging fails with recent React Native 0.85 / 0.86 Android Hermes apps

未关闭
#2,781 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@urbanst 已经在做这个了。

开始于 2026年7月11日。

  • #2782 来自 @urbanst —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
react-native, typescript, vscode

调研方向

从 README 的“Attach to Hermes application”配置开始,使用所述的最小 bare Android Hermes 应用重现该故障,并比较 React Native 0.74.x、0.85.3 和 0.86.x。跟踪 attach 路径以及针对所报告的 null 端口和未绑定断点的断点绑定行为;在较新版本中 VS Code 能够 attach 并绑定或命中 App.tsx 断点,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug

🐛 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.
主要语言
TypeScript
星标
2.7k
派生
296
平均合并
6 小时 44 分钟
30 天内合并 PR
25

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-react-native 的其他 Issue

查看 microsoft/vscode-react-native 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。