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

Method __init__

src/debugpy/adapter/sessions.py:30–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 _counter = itertools.count(1)
29
30 def __init__(self):
31 from debugpy.adapter import clients
32
33 super().__init__()
34
35 self.lock = threading.RLock()
36 self.id = next(self._counter)
37 self._changed_condition = threading.Condition(self.lock)
38
39 self.client = components.missing(self, clients.Client)
40 """The client component. Always present."""
41
42 self.launcher = components.missing(self, launchers.Launcher)
43 """The launcher componet. Always present in "launch" sessions, and never
44 present in "attach" sessions.
45 """
46
47 self.server = components.missing(self, servers.Server)
48 """The debug server component. Always present, unless this is a "launch"
49 session with "noDebug".
50 """
51
52 self.no_debug = None
53 """Whether this is a "noDebug" session."""
54
55 self.pid = None
56 """Process ID of the debuggee process."""
57
58 self.debug_options = {}
59 """Debug options as specified by "launch" or "attach" request."""
60
61 self.is_finalizing = False
62 """Whether finalize() has been invoked."""
63
64 self.observers += [lambda *_: self.notify_changed()]
65
66 def __str__(self):
67 return f"Session[{self.id}]"

Callers

nothing calls this directly

Calls 1

notify_changedMethod · 0.95

Tested by

no test coverage detected