From eb018d0d9cc1555ecd27de307a2d1e45bb9e7ff5 Mon Sep 17 00:00:00 2001 From: Maxim Popov Date: Fri, 6 Feb 2026 14:56:49 +0000 Subject: [PATCH] [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 GitOrigin-RevId: 986c8e156896c6f8202c96ed729e5ad383630075 --- python/helpers/debugpy/launcher/output.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/python/helpers/debugpy/launcher/output.py b/python/helpers/debugpy/launcher/output.py index bdae42f3d9f8..70cd5218ca93 100644 --- a/python/helpers/debugpy/launcher/output.py +++ b/python/helpers/debugpy/launcher/output.py @@ -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)