Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP
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
- 55/100
Hướng nghiên cứu
Start with lib/debug/server_dap.rb around the supportsExceptionOptions capability and compare the setExceptionBreakpoints handling with the DAP specification. Trace how exception filters are represented, then verify that arbitrary exception classes can be requested through DAP without changing the existing any and RuntimeError behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Your proposal
I'd like to catch exceptions of an arbitrary class via DAP (Debug Adapter Protocol), just like the console UI's catch MyError command.
Currently it is not possible to catch exceptions by specifying an arbitrary class via DAP.
I believe this can be achieved by handling the exceptionOptions argument of the setExceptionBreakpoints request and enabling the corresponding capability.
Reference: setExceptionBreakpoints in the DAP specification
https://microsoft.github.io/debug-adapter-protocol//specification.html
supportsExceptionOptions is listed as "Will be supported" in https://github.com/ruby/debug/blob/6510cfbc7496c55ebbefa437a25c17ca58f7c5eb/lib/debug/server_dap.rb#L169
Additional context
Background:
While developing an MCP server for the debug gem, I ran into the problem that catching an exception of a specific class is not possible via DAP.
rira100000000/debug-mcp
The standard filters are only two: any (all exceptions) and RuntimeError, so currently the only choices are catching every error or catching only RuntimeError.
With any, every Exception is caught — including ones raised internally by frameworks such as Rails — which produces a lot of noise before you reach the exception you actually care about.
- Ngôn ngữ chính
- Ruby
- Star
- 1.3k
- Fork
- 146
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 ruby/debug
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100