[Bundle workflow] Breakpoint in linked source not hit in VSCode on lightweight app initial load
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, javascript, typescript, vscode
- Lĩnh vực
- cli, developer-experience, mobile-dev
Hướng nghiên cứu
Tái hiện ứng dụng Android nhẹ bằng các lệnh NativeScript được liệt kê, sau đó bắt đầu với tns-core-modules/ui/bottom-navigation/bottom-navigation.android.ts và cấu hình stopOnEntry trong launch.json. Theo dõi luồng khởi động ban đầu và gỡ lỗi source-map để xác định lý do OnLoaded() bị bỏ qua, sử dụng cách khắc phục bằng debugger để đối chiếu. Được xem là hoàn tất khi breakpoint được kích hoạt trong quá trình tải ứng dụng ban đầu mà không thêm debugger;.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
Describe the bug
Breakpoint in linked tns-core-modules source is not hit in VSCode on initial app start when using a very thin (lightweight) NativeScript app (e.g. created from blank template) even when stopOnEntry is set to true. After initial load debugging works as expected. A workaround proposed by @DimitarTachev is to place a debugger; statement in the beginning of the file-to-debug.
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 - 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
},
- Try to debug using the newly added configuration
- Breakpoint in
OnLoaded()is not hit
Expected behavior
Breakpoints should work on initial app start as well
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/nativescript-cli
-
in-progress
NativeScript/nativescript-cli#6140 · 2 bình luận · 1 người được giao ·
-
NativeScript/nativescript-cli#6090 · 1 người được giao ·
-
in progress
NativeScript/nativescript-cli#6015 · 1 reaction · 1 người được giao ·
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NativeScript/nativescript-cli#5992 · 5 bình luận ·
-
feature-pending-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NativeScript/nativescript-cli#5975 ·
Tất cả issue của NativeScript/nativescript-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Seeed-Studio/wiki-documents#5655 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
capricorn86/happy-dom#2435 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Edit: CW+ Đang mởchannels:edit check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100