NativeScript / NativeScript/nativescript-cli

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

Aberta
#4,813 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

os: android os: ios
Linguagem predominante
JavaScript
Estrelas
1.1k
Forks
204
Merge médio
1d 9h
PRs com merge (30d)
8

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Reproduza o problema usando as etapas documentadas do NativeScript CLI, a configuração de inicialização do fluxo de trabalho de bundle e o breakpoint em tns-core-modules/ui/bottom-navigation/bottom-navigation.android.ts. Inspecione a depuração de bundle-workflow e o tratamento de source maps em torno da configuração do VSCode; está concluído quando o call stack mostra entradas significativas sem caminhos completos desnecessariamente longos.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
android, javascript, typescript, vscode
Domínio
cli, developer-experience, mobile-dev, tooling
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
38/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.