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

Method configurationDone_request

src/debugpy/adapter/clients.py:582–620  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

580
581 @message_handler
582 def configurationDone_request(self, request):
583 if self.start_request is None or self.has_started:
584 request.cant_handle(
585 '"configurationDone" is only allowed during handling of a "launch" '
586 'or an "attach" request'
587 )
588
589 try:
590 self.has_started = True
591 try:
592 result = self.server.channel.delegate(request)
593 except messaging.NoMoreMessages:
594 # Server closed connection before we could receive the response to
595 # "configurationDone" - this can happen when debuggee exits shortly
596 # after starting. It's not an error, but we can't do anything useful
597 # here at this point, either, so just bail out.
598 request.respond({})
599 self.start_request.respond({})
600 self.session.finalize(
601 "{0} disconnected before responding to {1}".format(
602 self.server,
603 json.repr(request.command),
604 )
605 )
606 return
607 else:
608 request.respond(result)
609 except messaging.MessageHandlingError as exc:
610 self.start_request.cant_handle(str(exc))
611 finally:
612 if self.start_request.response is None:
613 self.start_request.respond({})
614 self._propagate_deferred_events()
615
616 # Notify the client of any child processes of the debuggee that aren't already
617 # being debugged.
618 for conn in servers.connections():
619 if conn.server is None and conn.ppid == self.session.pid:
620 self.notify_of_subprocess(conn)
621
622 @message_handler
623 def evaluate_request(self, request):

Callers

nothing calls this directly

Calls 6

notify_of_subprocessMethod · 0.95
cant_handleMethod · 0.80
delegateMethod · 0.80
respondMethod · 0.80
finalizeMethod · 0.45

Tested by

no test coverage detected