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

Method _output

tests/debug/output.py:69–82  ·  view source on GitHub ↗
(self, which, encoding, lines)

Source from the content-addressed store, hash-verified

67 self._worker_threads[:] = []
68
69 def _output(self, which, encoding, lines):
70 try:
71 result = self._chunks[which]
72 except KeyError:
73 raise AssertionError(
74 f"{which} was not captured for {self.session.debuggee_id}"
75 )
76
77 with self._lock:
78 result = b"".join(result)
79 if encoding is not None:
80 result = result.decode(encoding)
81
82 return result.splitlines() if lines else result
83
84 def stdout(self, encoding=None):
85 """Returns stdout captured from the debugged process, as a single string.

Callers 4

stdoutMethod · 0.95
stderrMethod · 0.95
stdout_linesMethod · 0.95
stderr_linesMethod · 0.95

Calls 2

joinMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected