NativeScript / NativeScript/nativescript-cli

Attaching Debug from Chrome kills app on iOS

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

还没有人认领这个 Issue。

主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

NS 8.0.7
Xcode 12.4

Every time I run ns debug ios the app compiles fine and runs on the simulator.

If I open Chrome to start the debugging process with devtools://devtools/bundled/inspector.html?ws=localhost:41000 it immediately crashes the app.

Eventually after 4 or 5 times of restarting the app on the simulator the debug will connect. Error is

(Asterix added to hide Bundle ID)

Successfully synced application com..**** on device 4023F1A9-E743-4AD5-9D6D-4A22C0C0A6EE.
CONSOLE LOG: Loading inspector modules...
CONSOLE LOG: Finished loading inspector modules.
Frontend client connected.
NativeScript debugger has opened inspector socket on port 18185 for com.
.*****.
Backend socket created.
Backend socket closed!
Frontend socket closed!
CONSOLE LOG: Loading inspector modules...
CONSOLE LOG: Finished loading inspector modules.
Frontend client connected.
NativeScript debugger has opened inspector socket on port 18186 for com...
Backend socket created.
Backend socket closed!
Frontend socket closed!

I've removed the platforms folder and rebuilt but the problem persists.

ns doctor shows

✔ Component @nativescript/core has 8.0.7 version and is up to date.
✔ Component @nativescript/ios has 8.0.0 version and is up to date.

Is this correct.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先在 iOS 模拟器上使用 ns debug ios 重现故障,然后使用报告的 devtools URL 连接 Chrome,并比较 socket-close 日志。修复后应用应保持运行,并让调试器能够可靠连接;请使用报告的 NativeScript、iOS 和 Xcode 版本进行验证。

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

评估

技术栈
ios, javascript
领域
cli, mobile-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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