From 5e93cfde81af8bb237d64b274090e37f178208e2 Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Tue, 21 May 2019 08:46:21 -0300 Subject: [PATCH] Properly forward sys.stdin.read(). Fixes #1423 (#1438) --- .../_vendored/pydevd/_pydev_bundle/pydev_console_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py b/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py index e38462dc..8c246bc6 100644 --- a/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py +++ b/src/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py @@ -128,6 +128,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 + class CodeFragment: