Skip to content

Commit

Permalink
DAP: support custom request in session class
Browse files Browse the repository at this point in the history
UI_DAP -> Session: custom_dap_request_...

Session -> ThreadClient: custom_dap_request_event_...

Add "request_event" prefix to clarify it is a response (not Events in DAP)
  • Loading branch information
ono-max authored and ko1 committed Mar 24, 2023
1 parent 1ce0061 commit acb629a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/debug/server_dap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def process_protocol_request req
fail_response req
end
else
if respond_to? mid = "request_#{req['command']}"
if respond_to? mid = "custom_dap_request_#{req['command']}"
__send__ mid, req
else
raise "Unknown request: #{req.inspect}"
Expand Down Expand Up @@ -712,7 +712,11 @@ def process_protocol_result args
when :completions
@ui.respond req, result
else
raise "unsupported: #{args.inspect}"
if respond_to? mid = "custom_dap_request_event_#{type}"
__send__ mid, req
else
raise "unsupported: #{args.inspect}"
end
end
end

Expand Down

0 comments on commit acb629a

Please sign in to comment.