Open Chrome when using Chrome DevTools for debugging

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
android, ios, javascript

调研方向

首先跟踪 tns debug androidtns debug ios --chrome 入口点,然后查看 PR 3071,了解 DevTools URL 的生成方式。完成的标准是 Chrome 能打开该 URL,CI 能在不启动 Chrome 的情况下输出该 URL,--no-client 仍然得到遵守,可配置可执行文件名称,并处理 LiveSync URL 的变化。

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

描述

debug feature

Currently tns debug android and tns debug ios --chrome prepare the project, run it on specified device and prints a URL which should be opened in Chrome browser.
Instead the commands should open Chrome directly and load a specified URL.

The current implementation prints the URL as it is unable to open it in Chrome. However, the changes applied in this PR allow us to generate a URL to https://chrome-devtools-frontend.appspot.com/. This URL can be safely opened in Chrome directly from CLI.

Things to consider during implementation:

  • For testability, we should have an easy way to print the URL and do not open Chrome. This will be useful in CI.
  • Visual Studio Code Extension does not need to open Chrome, so ensure --no-client option is respected.
  • Chrome executable has different names on each OS. Also the Canary release has another name. Ensure the users have an easy way to set the name, specific to their system.
  • During debug operation, CLI LiveSyncs changes on device. This may produce different URL (the port may change), so ensure we open the URL again. In case the port is not changed, just inform the user to reconnect DevTools in the already opened tab.
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

贡献指南

打开贡献指南

从这里开始

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

NativeScript/nativescript-cli 的其他 Issue

查看 NativeScript/nativescript-cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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