NativeScript / NativeScript/nativescript-cli

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

Aperta
#4,813 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

os: android os: ios
Lingua principale
JavaScript
Stelle
1.1k
Fork
204
Merge medio
1g 9h
PR unite (30g)
8

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il problema utilizzando i passaggi documentati di NativeScript CLI, la configurazione di avvio del workflow di bundle e il breakpoint in tns-core-modules/ui/bottom-navigation/bottom-navigation.android.ts. Esamina il debugging di bundle-workflow e la gestione delle source map nella configurazione di VSCode; l'attività è completata quando il call stack mostra voci significative senza percorsi completi inutilmente lunghi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, javascript, typescript, vscode
Ambito
cli, developer-experience, mobile-dev, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.