Skip to content

Commit

Permalink
Add debug config property "clientOS" to replace "WindowsClient" / "Un…
Browse files Browse the repository at this point in the history
…ixClient" in "debugOptions".
  • Loading branch information
Pavel Minaev authored and int19h committed Mar 23, 2022
1 parent da25139 commit 2ac9538
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/debugpy/adapter/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
)

Expand Down

0 comments on commit 2ac9538

Please sign in to comment.