NativeScript / NativeScript/android

The run-time takes 5+ seconds to respond to Debugger.enable

未关闭
#886 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

severity: medium
主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

Please, provide the details below:

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes

Tell us about the problem

The run-time takes 5+ seconds to respond to Debugger.enable

Please provide the following version numbers that your issue occurs with:
  • CLI: 3.3.1
Please tell us how to recreate the issue in as much detail as possible.

This is reproducible with:
https://github.com/NativeScript/template-master-detail-ts
https://github.com/NativeScript/template-master-detail-ng
https://github.com/NativeScript/template-master-detail-kinvey

against an Android Pixel.

clone https://github.com/NativeScript/template-master-detail-ts

cd template-master-detail-ts
tns platform add android
tns debug android --start

After receiving the Debugger.enable request the run-time would trigger scriptParsed events for all sources in the project (500+ files) first and only then would respond to the Debugger.enable request.

Starting a debug session against any of the listed projects would time out as the JavaScript debugger (Microsoft implementation) in Visual Studio has a non-configurable 5 second timeout on all requests.

In {N} Sidekick the debug session would not timeout but it would still take more than 5 seconds to initialize.

Please note that after receiving a response to Debugger.enable the JavaScript debugger in Visual Studio would start sending Debugger.setBreakpointByUrl for all pre-set breakpoints (again 5s timeout) and if the run-time does not respond to a request the breakpoint would remain inactive.

贡献指南

打开贡献指南

从这里开始

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

调研方向

在列出的 template-master-detail 项目中,使用 tns debug android --start 在 Android Pixel 上重现该延迟。跟踪 runtime 如何处理 Debugger.enablescriptParsedDebugger.setBreakpointByUrl;当调试器初始化和预设断点在五秒超时前完成时,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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