Skip to content

Commit 2ac9538

Browse files
Pavel Minaevint19h
Pavel Minaev
authored andcommitted
Add debug config property "clientOS" to replace "WindowsClient" / "UnixClient" in "debugOptions".
1 parent da25139 commit 2ac9538

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/debugpy/adapter/clients.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -263,19 +263,21 @@ def handle(self, request):
263263
self._propagate_deferred_events()
264264
return
265265

266-
if {"WindowsClient", "Windows"} & debug_options:
267-
client_os_type = "WINDOWS"
266+
if "clientOS" in request:
267+
client_os = request("clientOS", json.enum("windows", "unix")).upper()
268+
elif {"WindowsClient", "Windows"} & debug_options:
269+
client_os = "WINDOWS"
268270
elif {"UnixClient", "UNIX"} & debug_options:
269-
client_os_type = "UNIX"
271+
client_os = "UNIX"
270272
else:
271-
client_os_type = "WINDOWS" if sys.platform == "win32" else "UNIX"
273+
client_os = "WINDOWS" if sys.platform == "win32" else "UNIX"
272274
self.server.channel.request(
273275
"setDebuggerProperty",
274276
{
275277
"skipSuspendOnBreakpointException": ("BaseException",),
276278
"skipPrintBreakpointException": ("NameError",),
277279
"multiThreadsSingleNotification": True,
278-
"ideOS": client_os_type,
280+
"ideOS": client_os,
279281
},
280282
)
281283

0 commit comments

Comments
 (0)