diff --git a/src/client/debugger/DebugClients/LocalDebugClient.ts b/src/client/debugger/DebugClients/LocalDebugClient.ts index e785d23a11cd..1ac552a7fe9f 100644 --- a/src/client/debugger/DebugClients/LocalDebugClient.ts +++ b/src/client/debugger/DebugClients/LocalDebugClient.ts @@ -66,7 +66,7 @@ export class LocalDebugClient extends DebugClient { return new Promise((resolve, reject) => { let fileDir = path.dirname(this.args.program); let processCwd = fileDir; - if (typeof this.args.cwd === 'string' && this.args.cwd.length > 0) { + if (typeof this.args.cwd === 'string' && this.args.cwd.length > 0 && this.args.cwd !== 'null') { processCwd = this.args.cwd; } let pythonPath = 'python'; diff --git a/src/client/debugger/DebugClients/NonDebugClient.ts b/src/client/debugger/DebugClients/NonDebugClient.ts index 5c94c3773d11..c2619d185fd5 100644 --- a/src/client/debugger/DebugClients/NonDebugClient.ts +++ b/src/client/debugger/DebugClients/NonDebugClient.ts @@ -42,7 +42,7 @@ export class NonDebugClient extends DebugClient { return new Promise((resolve, reject) => { let fileDir = path.dirname(this.args.program); let processCwd = fileDir; - if (typeof this.args.cwd === "string" && this.args.cwd.length > 0) { + if (typeof this.args.cwd === "string" && this.args.cwd.length > 0 && this.args.cwd !== 'null') { processCwd = this.args.cwd; } let pythonPath = "python";