Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP

Đang mở
#1,182 0 bình luận 0 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
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
ruby
Lĩnh vực
devtools

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

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 ruby/debug

Tất cả issue của ruby/debug

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.