PowerShell / PowerShell/PowerShellEditorServices
Bring launch sequencing in line with DAP spec
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 767
- Fork
- 266
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been requested.
Summary
Currently, our DAP conversation doesn't follow the spec explicitly in terms of conversation.
What is supposed to happen:
- Initialize is sent and server responds, then responds with capabilities
- Launch is sent by client after receiving capabilities. should be held and deferred until configurationDone
- Server sends initialized event (preferably when ready to receive launch requests)
- Client does config after initialized
- Configuration is done (breakpoints etc.)
- launch request is now responded to after configuration is completed
In actuality, we respond to the launch request immediately before configuration
The spec states:
Once the debug adapter is ready to receive configuration from the client, it sends an initialized event to the client. As described above, the client sends zero or more configuration-related requests before sending a configurationDone request.
After the response to configurationDone is sent, the debug adapter may respond to the launch or attach request, and then the debug session has started.
Proposed Design
We need to hold the launch response until after configurationDone is completed. Fixing this would likely be part of a larger refactor to fix the odd behavior of scripts being started directly within configurationDone handler, rather than configurationDone triggering an event or otherwise to start/release any pending launch messages.
As part of this, because the spec currently does not allow multiplexing requests over a single adapter channel, the launch/attach should singleton and throw an error if any additional launch/attach requests are made until the existing one completes.
Implementation Idea
When a launch task is started, a TaskCompletionSource or otherwise should be started and awaited, and the configurationDone handler will complete that task, enabling the launch task to resume and return its startup response.
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.
Hướng nghiên cứu
Bắt đầu bằng cách xác định các handler DAP cho launch/attach và configurationDone, sau đó so sánh trình tự của chúng với đặc tả DAP được dẫn. Theo dõi cách các launch tasks và responses hiện được hoàn tất. Hoàn tất nghĩa là các response của launch hoặc attach chờ đến configurationDone, initialized được gửi tại thời điểm thích hợp và các yêu cầu launch/attach chồng lấn bị từ chối.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- 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
- 35/100