From 7676e298b5ce461fdbbbc6c21332cff63334dca0 Mon Sep 17 00:00:00 2001 From: Pavel Minaev Date: Tue, 28 Jun 2022 18:13:58 -0700 Subject: [PATCH] Fix #731: "externalTerminal" does not work on Linux Do not wait for "runInTerminal" response when spawning the launcher. --- src/debugpy/adapter/launchers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/debugpy/adapter/launchers.py b/src/debugpy/adapter/launchers.py index 2a8e6488..cb8fc65d 100644 --- a/src/debugpy/adapter/launchers.py +++ b/src/debugpy/adapter/launchers.py @@ -155,7 +155,9 @@ def spawn_debuggee( if cwd is not None: request_args["cwd"] = cwd try: - session.client.channel.request("runInTerminal", request_args) + # It is unspecified whether this request receives a response immediately, or only + # after the spawned command has completed running, so do not block waiting for it. + session.client.channel.send_request("runInTerminal", request_args) except messaging.MessageHandlingError as exc: exc.propagate(start_request)