From b8dae4b043ed0f1311c96bd9b455d68344a76a86 Mon Sep 17 00:00:00 2001 From: Egor Eliseev Date: Thu, 4 Dec 2025 17:35:13 +0000 Subject: [PATCH] [python] PY-40035 sys.stdin.read() truncated at newlines during debug session Merge-request: IJ-MR-184781 Merged-by: Egor Eliseev GitOrigin-RevId: 3c5e3044065da34b042fc7859066e0b0111f22e9 --- python/helpers/pydev/_pydev_bundle/pydev_stdin.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/helpers/pydev/_pydev_bundle/pydev_stdin.py b/python/helpers/pydev/_pydev_bundle/pydev_stdin.py index 1fb6d7a2fbc7..479755ec00a8 100644 --- a/python/helpers/pydev/_pydev_bundle/pydev_stdin.py +++ b/python/helpers/pydev/_pydev_bundle/pydev_stdin.py @@ -118,6 +118,13 @@ class DebugConsoleStdIn(BaseStdIn): self.__pydev_run_command(False) return result + def read(self, *args, **kwargs): + # Notify Java side about input and call original function + self.__pydev_run_command(True) + result = self.original_stdin.read(*args, **kwargs) + self.__pydev_run_command(False) + return result + def __iter__(self): self.iter = self.original_stdin.__iter__() return self