flutter / flutter/devtools

The debugger screen should still be available when no compilation service is present

Đang mở
#6,672 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
P2 screen: debugger
Ngôn ngữ chính
Dart
Star
1.7k
Fork
404
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
18

Mô tả

When attempting to debug a test in the Flutter engine repo, @dnfield was unable to find the Debugger screen when attaching to the test with DevTools.

**Reproduction steps:**

1: Make a hello_world.dart: void main() { print('hello world'); }
2: dart compile kernel hello_world.dart
3: /path/to/flutter_sdk/bin/cache/artifacts/engine/darwin-x64/flutter_tester --enable-observatory --start-paused hello_world.dill
4: Navigate to printed URL, get error message
5: run dart devtools and input that URL
6: No debugger tab.

@jason-simmons pointed out that this tab is being hidden because the check for whether or not the target application is in debug mode fails due to the absence of a compilation service:

> DevTools is not showing the debugger tab because its check for whether the app is in debug mode is failing.
>
> The check is trying to evaluate an expression in the target VM. But that fails with a No compilation service available; cannot evaluate from source. error.

Typically the Flutter tool registers the compilation service, so it's not available when running tests with `flutter_tester` directly.

The lack of a compilation service shouldn't result in the debugger screen being hidden but should instead only result in functionality requiring expression evaluation being disabled.

FYI @elliette @kenzieschmoll

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện vấn đề bằng các bước với hello_world.dart, dart compile kernel, flutter_tester và DevTools, sau đó theo dõi bước kiểm tra khả năng hiển thị của tab Debugger được mô tả trong issue. Hoàn thành khi màn hình Debugger vẫn khả dụng mà không cần dịch vụ biên dịch, trong khi các chức năng yêu cầu đánh giá biểu thức bị vô hiệu hóa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
dart, devtools, flutter
Lĩnh vực
devtools
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.