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

Method start

src/debugpy/common/messaging.py:1139–1156  ·  view source on GitHub ↗

Starts a message loop which parses incoming messages and invokes handlers for them on a background thread, until the channel is closed. Incoming messages, including responses to requests, will not be processed at all until this is invoked.

(self)

Source from the content-addressed store, hash-verified

1137 self.stream.close()
1138
1139 def start(self):
1140 """Starts a message loop which parses incoming messages and invokes handlers
1141 for them on a background thread, until the channel is closed.
1142
1143 Incoming messages, including responses to requests, will not be processed at
1144 all until this is invoked.
1145 """
1146
1147 assert not self.started
1148 self.started = True
1149
1150 self._parser_thread = threading.Thread(
1151 target=self._parse_incoming_messages, name=f"{self} message parser"
1152 )
1153
1154 hide_thread_from_debugger(self._parser_thread)
1155 self._parser_thread.daemon = True
1156 self._parser_thread.start()
1157
1158 def wait(self):
1159 """Waits for the message loop to terminate, and for all enqueued Response

Callers 15

connectFunction · 0.95
__init__Method · 0.95
test_eventsMethod · 0.95
test_requestsMethod · 0.95
test_responsesMethod · 0.95
test_fuzzMethod · 0.95
__init__Method · 0.45
spawnFunction · 0.45
_enqueue_handlersMethod · 0.45
serveFunction · 0.45
dump_afterFunction · 0.45

Calls 1

Tested by 5

test_eventsMethod · 0.76
test_requestsMethod · 0.76
test_responsesMethod · 0.76
test_fuzzMethod · 0.76