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

Method connect_to_adapter

tests/debug/session.py:488–502  ·  view source on GitHub ↗
(self, address)

Source from the content-addressed store, hash-verified

486 }
487
488 def connect_to_adapter(self, address):
489 assert self.channel is None
490
491 self.before_connect(address)
492 host, port = address
493 log.info("Connecting to {0} at {1}:{2}", self.adapter_id, host, port)
494
495 self.expected_adapter_sockets["client"]["port"] = port
496
497 ipv6 = host.count(":") > 1
498 sock = sockets.create_client(ipv6)
499 sock.connect(address)
500
501 stream = messaging.JsonIOStream.from_socket(sock, name=self.adapter_id)
502 self._start_channel(stream)
503
504 def start(self):
505 config = self.config

Callers 5

startMethod · 0.95
attach_connectFunction · 0.80
test_attach_apiFunction · 0.80
test_reattachFunction · 0.80

Calls 5

_start_channelMethod · 0.95
infoMethod · 0.80
from_socketMethod · 0.80
countMethod · 0.45
connectMethod · 0.45

Tested by 3

test_attach_apiFunction · 0.64
test_reattachFunction · 0.64