NativeScript / NativeScript/nativescript-cli
[Bundle workflow] VSCode call stack window contains a lot of garbage debugging linked source
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 204
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 8
Beschreibung
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 demonstrating the workaround:

To Reproduce
git clone git@github.com:NativeScript/NativeScript.gitcd NativeScripttns create bottom-nav-test --template tns-template-blank-tscd bottom-nav-testtns migrate- Open NativeScript folder in VSCode
- 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>
- Place a breakpoint in the
OnLoaded()method in tns-core-modules/ui/bottom-navigation/bottom-navigation.android.ts and adebugger;statement at the beginning of the file - 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
},
- Debug using the newly added configuration
- 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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem mit den dokumentierten NativeScript CLI-Schritten, der Startkonfiguration für den Bundle-Workflow und dem Breakpoint in tns-core-modules/ui/bottom-navigation/bottom-navigation.android.ts. Untersuche das Debugging des Bundle-Workflows und die Behandlung von Source Maps rund um die VSCode-Konfiguration; fertig ist die Aufgabe, wenn der Call Stack aussagekräftige Einträge ohne unnötig lange vollständige Pfade anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, javascript, typescript, vscode
- Bereich
- cli, developer-experience, mobile-dev, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100