MCPcopy Create free account
hub / github.com/microsoft/debugpy / respond

Method respond

src/debugpy/common/messaging.py:673–687  ·  view source on GitHub ↗
(self, body)

Source from the content-addressed store, hash-verified

671 return self.arguments
672
673 def respond(self, body):
674 assert self.response is None
675 d = {"type": "response", "request_seq": self.seq, "command": self.command}
676
677 if isinstance(body, Exception):
678 d["success"] = False
679 d["message"] = str(body)
680 else:
681 d["success"] = True
682 if body is not None and body != {}:
683 d["body"] = body
684
685 with self.channel._send_message(d) as seq:
686 pass
687 self.response = Response(self.channel, seq, self, body)
688
689 @staticmethod
690 def _parse(channel, message_dict):

Callers 10

_handleMethod · 0.95
terminate_requestFunction · 0.80
errorMethod · 0.80
handleMethod · 0.80
attach_requestMethod · 0.80
handle_responseMethod · 0.80
disconnect_requestMethod · 0.80
requestMethod · 0.80
pause_requestMethod · 0.80

Calls 2

_send_messageMethod · 0.80
ResponseClass · 0.70

Tested by 2

requestMethod · 0.64
pause_requestMethod · 0.64