Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Ruby
- Sterne
- 1.3k
- Forks
- 151
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ruby/debug
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
-
Missing DAP OutputEvents for debuggee stdout/stderrEvtl. vergeben @vitallium hat das vor 336 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
openfoodfoundation/openfoodnetwork#15070 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
agent:triaged bug bughunt pm:bundler priority:p1 ux
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
SocketDev/socket-patch#2326 ·
Maintainer antworten meist innerhalb von 1 Tag
-
instrumentation-sidekiq
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
open-telemetry/opentelemetry-ruby-contrib#2735 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
majorsilence/Reporting#703 ·
Maintainer antworten meist innerhalb von 1 Tag
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
ruby/securerandom#92 ·