PowerShell / PowerShell/PowerShellEditorServices
Support Set-PSBreakpoint showing breakpoints in the editor
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ả
By creating a Proxy function of Set-PSBreakpoint, we can fire the breakpoint event as seen in the DAP spec to notify the client that a breakpoint has been added.
This is the really the final feature needed to provide the "console debugging in PSES experience" that feels totally integrated.
Creating a Proxy cmdlet is easy with:
$Metadata = [System.Management.Automation.CommandMetaData]::new((Get-Command Set-PSBreakpoint))
[System.Management.Automation.ProxyCommand]::Create($Metadata)
Then we'll need a way to give the EditorObject the state of the debugger... but mainly the JsonRpcServer object so that we can use it to send the SendNotification( method to send the breakpoint information to the client.
Then we take that proxy function and add something like:
$psEditor.Components
.GetService([OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServer])
.SendNotification("breakpoint", [OmniSharp.Extensions.DebugAdapter.Protocol.Events.BreakpointEvent]::new(<#...#>))
with some error handling and we should be good to go.
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 đọc EditorObject.cs và cách tiếp cận proxy của Set-PSBreakpoint được mô tả trong issue. Theo dõi cách JsonRpcServer hoặc ILanguageServer được truy cập, sau đó xem lại BreakpointEvent trong đặc tả DAP và kiểu giao thức được tham chiếu. Công việc được xem là hoàn tất khi việc thêm breakpoint thông qua Set-PSBreakpoint thông báo cho trình soạn thảo cùng thông tin về breakpoint và có xử lý lỗ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, powershell
- Lĩnh vực
- devtools
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 38/100