From b4cf74d97f1990d3c9233e9ada3a0b3dcd9e2a44 Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Wed, 19 Jul 2023 15:16:52 -0700 Subject: [PATCH] add cwd for debugging --- src/client/testing/common/debugLauncher.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/testing/common/debugLauncher.ts b/src/client/testing/common/debugLauncher.ts index dcf23c0478db..a54470abefd5 100644 --- a/src/client/testing/common/debugLauncher.ts +++ b/src/client/testing/common/debugLauncher.ts @@ -226,6 +226,11 @@ export class DebugLauncher implements ITestDebugLauncher { const pluginPath = path.join(EXTENSION_ROOT_DIR, 'pythonFiles'); launchArgs.env.PYTHONPATH = pluginPath; } + if (launchArgs.env && launchArgs.env.PYTHONPATH) { + launchArgs.env.PYTHONPATH = `${launchArgs.env.PYTHONPATH}${path.delimiter}${options.cwd}`; + } else if (launchArgs.env) { + launchArgs.env.PYTHONPATH = options.cwd; + } // Clear out purpose so we can detect if the configuration was used to // run via F5 style debugging.