Skip to content

Conversation

@cute-cirno
Copy link

Fix "clientOS" options

My debugger works in VS Code versions <=1.71.2. In higher versions, it can attach but fails to hit breakpoints. By comparing the logs, I found that in higher versions of VS Code, the option "WindowsClient" was missing during the debugger initialization. I manually added it, and the breakpoints were successfully hit.

So, I reviewed the code of this plugin and found that the options "WindowsClient" and "UnixClient" were defined but not set according to "clientOS".

@karthiknadig karthiknadig self-assigned this Feb 6, 2025
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Feb 6, 2025
@karthiknadig
Copy link
Member

karthiknadig commented Feb 6, 2025

This is a bug in debugpy,

@rchiodo debugpy config handler should read this from clientOS. debugOptions is a deprecated field.

This was intentionally removed as debugpy added support to read this config setting.

removal PR: https://github.com/microsoft/vscode-python/pull/20805/files
Debugpy code where clientOS is read: https://github.com/microsoft/debugpy/blob/fb0b06cab161478db95420c5bfb485c39d508f62/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py#L98-L99

@rchiodo
Copy link
Contributor

rchiodo commented Feb 6, 2025

It seems that debugpy is reading this value. Perhaps @cute-cirno has their own version of debugpy?

The value is read here:
https://github.com/microsoft/debugpy/blob/fb0b06cab161478db95420c5bfb485c39d508f62/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py#L399

@cute-cirno
Copy link
Author

Oh! I understand. Since I am using a very old version of debugpy and cannot upgrade it, the clientOS configuration option has no effect when I use the new Python extension for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants