Skip to content

Support the clientOS property in VS code #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,15 @@
"default": "Python Debug Console",
"description": "Display name of the debug console or terminal",
"type": "string"
},
"clientOS": {
"default": null,
"description": "OS that VS code is using.",
"enum": [
"windows",
null,
"unix"
]
}
}
},
Expand Down Expand Up @@ -508,6 +517,15 @@
"default": "Python Debug Console",
"description": "Display name of the debug console or terminal",
"type": "string"
},
"clientOS": {
"default": null,
"description": "OS that VS code is using.",
"enum": [
"windows",
null,
"unix"
]
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/extension/debugger/configuration/resolvers/attach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class AttachConfigurationResolver extends BaseConfigurationResolver<Attac
(item, pos) => dbgConfig.debugOptions!.indexOf(item) === pos,
);
}
if (debugConfiguration.clientOS === undefined) {
if (!debugConfiguration.clientOS) {
debugConfiguration.clientOS = getOSType() === OSType.Windows ? 'windows' : 'unix';
}
return debugConfiguration;
Expand Down Expand Up @@ -80,7 +80,7 @@ export class AttachConfigurationResolver extends BaseConfigurationResolver<Attac
if (getOSType() === OSType.Windows && isLocalHost) {
AttachConfigurationResolver.debugOption(debugOptions, DebugOptions.FixFilePathCase);
}
if (debugConfiguration.clientOS === undefined) {
if (!debugConfiguration.clientOS) {
debugConfiguration.clientOS = getOSType() === OSType.Windows ? 'windows' : 'unix';
}
if (debugConfiguration.showReturnValue) {
Expand Down
2 changes: 1 addition & 1 deletion src/extension/debugger/configuration/resolvers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
debugConfiguration: DebugConfiguration,
_token?: CancellationToken,
): Promise<T | undefined> {
if (debugConfiguration.clientOS === undefined) {
if (!debugConfiguration.clientOS) {
debugConfiguration.clientOS = getOSType() === OSType.Windows ? 'windows' : 'unix';
}
if (debugConfiguration.consoleName) {
Expand Down
2 changes: 1 addition & 1 deletion src/extension/debugger/configuration/resolvers/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class LaunchConfigurationResolver extends BaseConfigurationResolver<Launc

const workspaceFolder = LaunchConfigurationResolver.getWorkspaceFolder(folder);
await this.resolveAndUpdatePaths(workspaceFolder, debugConfiguration);
if (debugConfiguration.clientOS === undefined) {
if (!debugConfiguration.clientOS) {
debugConfiguration.clientOS = getOSType() === OSType.Windows ? 'windows' : 'unix';
}
if (debugConfiguration.consoleName) {
Expand Down
Loading