diff --git a/src/client/testing/common/debugLauncher.ts b/src/client/testing/common/debugLauncher.ts index 63e2a4543beb..0f217afa6513 100644 --- a/src/client/testing/common/debugLauncher.ts +++ b/src/client/testing/common/debugLauncher.ts @@ -206,18 +206,19 @@ export class DebugLauncher implements ITestDebugLauncher { launchArgs.request = 'launch'; // Both types of tests need to have the port for the test result server. - if (options.runTestIdsPort) { - launchArgs.env = { - ...launchArgs.env, - RUN_TEST_IDS_PORT: options.runTestIdsPort, - }; - } - if (options.testProvider === 'pytest' && pythonTestAdapterRewriteExperiment) { - if (options.pytestPort && options.pytestUUID) { + // if (options.runTestIdsPort) { + // launchArgs.env = { + // ...launchArgs.env, + // RUN_TEST_IDS_PORT: options.runTestIdsPort, + // }; + // } + if (pythonTestAdapterRewriteExperiment) { + if (options.pytestPort && options.pytestUUID && options.runTestIdsPort) { launchArgs.env = { ...launchArgs.env, TEST_PORT: options.pytestPort, TEST_UUID: options.pytestUUID, + RUN_TEST_IDS_PORT: options.runTestIdsPort, }; } else { throw Error( diff --git a/src/client/testing/testController/common/server.ts b/src/client/testing/testController/common/server.ts index 7437a44d6080..50ae1f3f7536 100644 --- a/src/client/testing/testController/common/server.ts +++ b/src/client/testing/testController/common/server.ts @@ -211,6 +211,8 @@ export class PythonTestServer implements ITestServer, Disposable { token: options.token, testProvider: UNITTEST_PROVIDER, runTestIdsPort: runTestIdPort, + pytestUUID: uuid.toString(), + pytestPort: this.getPort().toString(), }; traceInfo(`Running DEBUG unittest with arguments: ${args}\r\n`);