Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP

オープン
#1,182 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
ruby
領域
devtools

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Ruby
スター
1.3k
フォーク
146
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ruby/debug のほかの issue

ruby/debug の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。