React Native Tools debugging fails with recent React Native 0.85 / 0.86 Android Hermes apps
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- react-native, typescript, vscode
- 领域
- devtools, mobile-dev
调研方向
从 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 内容生成。
描述
🐛 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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-react-native 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/vscode-react-native#2963 ·
维护者通常 1 天内回复
-
[Feature] Stop Expo Go installation when Quick Pick is canceled可能已有人在做 @erenbati 于 11 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 88/100
microsoft/vscode-react-native#2959 ·
维护者通常 1 天内回复
-
enhancement follow-up
难度 2/5 1-3 小时 新手友好度 88/100
microsoft/vscode-react-native#2951 ·
维护者通常 1 天内回复
-
[Feature] Expo Doctor output is lost when diagnostics fail可能已有人在做 @erenbati 于 11 天前认领。 未关闭enhancement
难度 3/5 1-2 天 新手友好度 72/100
microsoft/vscode-react-native#2957 ·
维护者通常 1 天内回复
-
enhancement follow-up
难度 3/5 1-2 天 新手友好度 68/100
microsoft/vscode-react-native#2952 ·
维护者通常 1 天内回复
查看 microsoft/vscode-react-native 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
rajbos/ai-engineering-fluency#2340 · 1 条评论 ·
维护者通常 1 天内回复
-
community documentation first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 70/100
lingdojo/kana-dojo#31864 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
zenstackhq/zenstack#2873 ·
维护者通常 1 天内回复
-
CLI: TUI shows onboarding when the provider's API key is only in the environment (e.g. OPENROUTER_API_KEY)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭CLI
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
paperclipai/paperclip#15490 ·
维护者通常 1 天内回复