NativeScript / NativeScript/android

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

オープン
#886 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

severity: medium
主要言語
C++
スター
563
フォーク
144
平均マージ
10時間 46分
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

一覧にある template-master-detail プロジェクトで、Android Pixel 上で tns debug android --start を使って遅延を再現します。runtime が Debugger.enablescriptParsedDebugger.setBreakpointByUrl をどのように処理するかを追跡します。デバッガーの初期化とプリセットされたブレークポイントの設定が、5 秒のタイムアウトなしに完了すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, javascript
領域
devtools, mobile-dev, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
32/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。