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

Method attach_to_session

src/debugpy/adapter/servers.py:201–211  ·  view source on GitHub ↗

Attaches this server to the specified Session as a Server component. Raises ValueError if the server already belongs to some session.

(self, session)

Source from the content-addressed store, hash-verified

199 _connections_changed.set()
200
201 def attach_to_session(self, session):
202 """Attaches this server to the specified Session as a Server component.
203
204 Raises ValueError if the server already belongs to some session.
205 """
206
207 with _lock:
208 if self.server is not None:
209 raise ValueError
210 log.info("Attaching {0} to {1}", self, session)
211 self.server = Server(session, self)
212
213
214class Server(components.Component):

Callers 2

spawn_debuggeeFunction · 0.80
attach_requestMethod · 0.80

Calls 2

infoMethod · 0.80
ServerClass · 0.70

Tested by

no test coverage detected