diff --git a/src/client/debugger/extension/configuration/resolvers/attach.ts b/src/client/debugger/extension/configuration/resolvers/attach.ts index bdc72680d861..6e5ca501463e 100644 --- a/src/client/debugger/extension/configuration/resolvers/attach.ts +++ b/src/client/debugger/extension/configuration/resolvers/attach.ts @@ -43,17 +43,10 @@ export class AttachConfigurationResolver extends BaseConfigurationResolver { expect(debugConfig).to.have.property('clientOS', getClientOS()); expect(debugConfig).to.have.property('debugOptions').to.be.deep.equal(expectedDebugOptions); }); - - const testsForJustMyCode = [ - { - justMyCode: false, - debugStdLib: true, - expectedResult: false, - }, - { - justMyCode: false, - debugStdLib: false, - expectedResult: false, - }, - { - justMyCode: false, - debugStdLib: undefined, - expectedResult: false, - }, - { - justMyCode: true, - debugStdLib: false, - expectedResult: true, - }, - { - justMyCode: true, - debugStdLib: true, - expectedResult: true, - }, - { - justMyCode: true, - debugStdLib: undefined, - expectedResult: true, - }, - { - justMyCode: undefined, - debugStdLib: false, - expectedResult: true, - }, - { - justMyCode: undefined, - debugStdLib: true, - expectedResult: false, - }, - { - justMyCode: undefined, - debugStdLib: undefined, - expectedResult: true, - }, - ]; - test('Ensure justMyCode property is correctly derived from debugStdLib', async () => { - const activeFile = 'xyz.py'; - const workspaceFolder = createMoqWorkspaceFolder(__dirname); - setupActiveEditor(activeFile, PYTHON_LANGUAGE); - const defaultWorkspace = path.join('usr', 'desktop'); - setupWorkspaces([defaultWorkspace]); - - const debugOptions = debugOptionsAvailable - .slice() - .concat(DebugOptions.Jinja, DebugOptions.Sudo) as DebugOptions[]; - - testsForJustMyCode.forEach(async (testParams) => { - const debugConfig = await resolveDebugConfiguration(workspaceFolder, { - ...attach, - debugOptions, - justMyCode: testParams.justMyCode, - debugStdLib: testParams.debugStdLib, - }); - expect(debugConfig).to.have.property('justMyCode', testParams.expectedResult); - }); - }); }); }); diff --git a/src/test/debugger/extension/configuration/resolvers/launch.unit.test.ts b/src/test/debugger/extension/configuration/resolvers/launch.unit.test.ts index 59f61f81cd85..f312c99b1cbc 100644 --- a/src/test/debugger/extension/configuration/resolvers/launch.unit.test.ts +++ b/src/test/debugger/extension/configuration/resolvers/launch.unit.test.ts @@ -768,80 +768,13 @@ getInfoPerOS().forEach(([osName, osType, path]) => { expect(debugConfig).to.have.property('redirectOutput', true); expect(debugConfig).to.have.property('justMyCode', false); expect(debugConfig).to.have.property('debugOptions'); - const expectedOptions = [ - DebugOptions.DebugStdLib, - DebugOptions.ShowReturnValue, - DebugOptions.RedirectOutput, - ]; + const expectedOptions = [DebugOptions.ShowReturnValue, DebugOptions.RedirectOutput]; if (osType === platform.OSType.Windows) { expectedOptions.push(DebugOptions.FixFilePathCase); } expect((debugConfig as DebugConfiguration).debugOptions).to.be.deep.equal(expectedOptions); }); - const testsForJustMyCode = [ - { - justMyCode: false, - debugStdLib: true, - expectedResult: false, - }, - { - justMyCode: false, - debugStdLib: false, - expectedResult: false, - }, - { - justMyCode: false, - debugStdLib: undefined, - expectedResult: false, - }, - { - justMyCode: true, - debugStdLib: false, - expectedResult: true, - }, - { - justMyCode: true, - debugStdLib: true, - expectedResult: true, - }, - { - justMyCode: true, - debugStdLib: undefined, - expectedResult: true, - }, - { - justMyCode: undefined, - debugStdLib: false, - expectedResult: true, - }, - { - justMyCode: undefined, - debugStdLib: true, - expectedResult: false, - }, - { - justMyCode: undefined, - debugStdLib: undefined, - expectedResult: true, - }, - ]; - test('Ensure justMyCode property is correctly derived from debugStdLib', async () => { - const pythonPath = `PythonPath_${new Date().toString()}`; - const workspaceFolder = createMoqWorkspaceFolder(__dirname); - const pythonFile = 'xyz.py'; - setupIoc(pythonPath); - setupActiveEditor(pythonFile, PYTHON_LANGUAGE); - testsForJustMyCode.forEach(async (testParams) => { - const debugConfig = await resolveDebugConfiguration(workspaceFolder, { - ...launch, - debugStdLib: testParams.debugStdLib, - justMyCode: testParams.justMyCode, - }); - expect(debugConfig).to.have.property('justMyCode', testParams.expectedResult); - }); - }); - const testsForRedirectOutput = [ { console: 'internalConsole', diff --git a/src/test/testing/common/debugLauncher.unit.test.ts b/src/test/testing/common/debugLauncher.unit.test.ts index ef3e678c13f7..31ba761eb946 100644 --- a/src/test/testing/common/debugLauncher.unit.test.ts +++ b/src/test/testing/common/debugLauncher.unit.test.ts @@ -234,13 +234,6 @@ suite('Unit Tests - Debug Launcher', () => { } expected.workspaceFolder = workspaceFolders[0].uri.fsPath; expected.debugOptions = []; - if (expected.justMyCode === undefined) { - // Populate justMyCode using debugStdLib - expected.justMyCode = !expected.debugStdLib; - } - if (!expected.justMyCode) { - expected.debugOptions.push(DebugOptions.DebugStdLib); - } if (expected.stopOnEntry) { expected.debugOptions.push(DebugOptions.StopOnEntry); } @@ -379,7 +372,6 @@ suite('Unit Tests - Debug Launcher', () => { envFile: 'some/dir/.env', redirectOutput: false, debugStdLib: true, - justMyCode: false, // added by LaunchConfigurationResolver: internalConsoleOptions: 'neverOpen', subProcess: true, @@ -399,7 +391,6 @@ suite('Unit Tests - Debug Launcher', () => { envFile: expected.envFile, redirectOutput: expected.redirectOutput, debugStdLib: expected.debugStdLib, - justMyCode: undefined, }, ]);