NativeScript / NativeScript/nativescript-cli

[Bundle workflow] VSCode call stack window contains a lot of garbage debugging linked source

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

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

os: android os: ios
主要言語
JavaScript
スター
1.1k
フォーク
204
平均マージ
1日 9時間
マージ済み PR(30日)
8

説明

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: rc
  • Cross-platform modules: rc
  • Android Runtime: rc
  • iOS Runtime: rc

Describe the bug
Debugging linked tns-core-modules source in VSCode with bundle workflow currently requires us to do it from the top NativeScript folder -- this causes a problem where some of the call stack window entries contain the full filepath thus becoming extremely long (and hiding the essential debugging information). To fix this we have to make the call stack window twice as wide (thus limiting the file listing space)

Screenshot demonstrating the issue (default call stack window width practically shows no meaningful information):
Screenshot 2019-07-05 at 19 45 48

Screenshot demonstrating the workaround:
Screenshot 2019-07-05 at 19 46 22

To Reproduce

  1. git clone git@github.com:NativeScript/NativeScript.git
  2. cd NativeScript
  3. tns create bottom-nav-test --template tns-template-blank-ts
  4. cd bottom-nav-test
  5. tns migrate
  6. Open NativeScript folder in VSCode
  7. Replace the contents of bottom-nav-test/app-root.xml with:
<BottomNavigation>
    <TabStrip>
        <TabStripItem title="First"></TabStripItem>
        <TabStripItem title="Second"></TabStripItem>
    </TabStrip>

    <TabContentItem>
        <GridLayout>
            <Label text="First View" />
        </GridLayout>
    </TabContentItem>

        <TabContentItem>
        <GridLayout>
            <Label text="Second View" />
        </GridLayout>
    </TabContentItem>
</BottomNavigation>
  1. Place a breakpoint in the OnLoaded() method in tns-core-modules/ui/bottom-navigation/bottom-navigation.android.ts and a debugger; statement at the beginning of the file
  2. Configure NativeScript debugging and add the following debug configuration in launch.json:
        {
            "name": "bottom-nav | Launch on Android",
            "type": "nativescript",
            "request": "launch",
            "platform": "android",
            "appRoot": "${workspaceRoot}/bottom-nav-test",
            "sourceMaps": true,
            "stopOnEntry": true,
            "watch": true
        },
  1. Debug using the newly added configuration
  2. Breakpoint in OnLoaded() is hit -- see the call stack window

Expected behavior
Call stack window should not display full filepath but only meaningful debug information.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

文書化された NativeScript CLI の手順、bundle workflow の起動構成、および tns-core-modules/ui/bottom-navigation/bottom-navigation.android.ts の breakpoint を使用して問題を再現します。VSCode 構成周辺の bundle-workflow のデバッグと source-map の処理を調査します。完了とは、call stack に意味のあるエントリが表示され、不必要に長いフルパスが表示されないことです。

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

評価

技術スタック
android, javascript, typescript, vscode
領域
cli, developer-experience, mobile-dev, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

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

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