Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Reported slowness due in variable expansion

Đang mở
#1,660 2 bình luận 3 reaction 0 người được giao Xem trên GitHub

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
32/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
devtools, performance

Hướng nghiên cứu

Issue không nêu tệp, bài kiểm thử hay trường hợp có thể tái hiện nào. Hãy bắt đầu bằng cách theo dõi cách debugpy xử lý việc trình bày và mở rộng biến đối với các giá trị rất lớn, sau đó so sánh hành vi đó với các cơ chế lazy và indexedVariables của DAP được mô tả ở đây. Công việc được xem là hoàn tất khi các biến lớn không còn chặn tương tác với trình gỡ lỗi hoặc làm các client quá tải.

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

Mô tả

bug needs repro

Isidor pointed out a tweet that mentions

S Code’s debugger would lock up whenever I stepped past a line like: S=tensor.untyped_storage()... the debugger window that automatically displays local variables started a dump of over a billion elements from the debug server before it would process any other commands.

I have not attempted to repro myself, but there are a few ways in the debug protocol that cases like this can be handled:

  • Set lazy: true on the VariablePresentationHints of potentially expensive variables so that they aren't expanded without user action
  • Use indexedVariables to allow the client to request a small number of a variable's contained data and page through it

Even if it's unavoidable that a giant variable's data is loaded into the debug adapter, it should use these mechanisms to avoid overloading clients and slowing down interaction on the protocol.

Let me know if there's anything I can help with from the VS Code side :)

Ngôn ngữ chính
Python
Star
2.5k
Fork
202
Merge trung bình
5 ngày 1 giờ
Pull request đã merge (30 ngày)
1

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/debugpy

Tất cả issue của microsoft/debugpy

Issue tương tự

Thêm issue về Python

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.