[debugger] PY-87163 debugpy - changed console type to integratedTerminal, added runInTerminal support in client, reverted changes in output.py

Merge-request: IJ-MR-190108
Merged-by: Maxim Popov <maxim.popov@jetbrains.com>

GitOrigin-RevId: 986c8e156896c6f8202c96ed729e5ad383630075
This commit is contained in:
Maxim Popov
2026-02-06 14:56:49 +00:00
committed by intellij-monorepo-bot
parent c34e0f1f35
commit eb018d0d9c
-13
View File
@@ -3,7 +3,6 @@
# for license information.
import codecs
import fcntl
import os
import threading
@@ -50,16 +49,6 @@ class CaptureOutput(object):
else:
log.info("Using encoding {0!r} for {1}", encoding, category)
# Set stream to non-blocking mode to prevent worker thread from hanging
# when the IDE/adapter doesn't consume output fast enough
try:
fd = self._stream.fileno()
flags = fcntl.fcntl(fd, fcntl.F_GETFL)
fcntl.fcntl(fd, fcntl.F_SETFL, flags | os.O_NONBLOCK)
log.info("Set {0} stream to non-blocking mode", category)
except Exception:
log.warning("Could not set {0} stream to non-blocking mode; tee may block", category)
self._worker_thread = threading.Thread(target=self._worker, name=category)
self._worker_thread.start()
@@ -76,13 +65,11 @@ class CaptureOutput(object):
try:
s = os.read(self._fd, 0x1000)
except Exception:
log.info("os.read() raised exception in {0} worker.", self.category)
break
if not len(s):
break
self._process_chunk(s)
log.info("Worker thread for {0} exiting.", self.category)
# Flush any remaining data in the incremental decoder.
self._process_chunk(b"", final=True)