From 2ac9538dd5d59d0bb582d445e4a6b87663cfbab4 Mon Sep 17 00:00:00 2001 From: Pavel Minaev Date: Wed, 23 Mar 2022 15:46:46 -0700 Subject: [PATCH] Add debug config property "clientOS" to replace "WindowsClient" / "UnixClient" in "debugOptions". --- src/debugpy/adapter/clients.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/debugpy/adapter/clients.py b/src/debugpy/adapter/clients.py index d0b3fa143..dac3d89f6 100644 --- a/src/debugpy/adapter/clients.py +++ b/src/debugpy/adapter/clients.py @@ -263,19 +263,21 @@ def handle(self, request): self._propagate_deferred_events() return - if {"WindowsClient", "Windows"} & debug_options: - client_os_type = "WINDOWS" + if "clientOS" in request: + client_os = request("clientOS", json.enum("windows", "unix")).upper() + elif {"WindowsClient", "Windows"} & debug_options: + client_os = "WINDOWS" elif {"UnixClient", "UNIX"} & debug_options: - client_os_type = "UNIX" + client_os = "UNIX" else: - client_os_type = "WINDOWS" if sys.platform == "win32" else "UNIX" + client_os = "WINDOWS" if sys.platform == "win32" else "UNIX" self.server.channel.request( "setDebuggerProperty", { "skipSuspendOnBreakpointException": ("BaseException",), "skipPrintBreakpointException": ("NameError",), "multiThreadsSingleNotification": True, - "ideOS": client_os_type, + "ideOS": client_os, }, )