From fb124a590a925e0b30f7ce24d79f54111415da2d Mon Sep 17 00:00:00 2001 From: Derek Keeler Date: Wed, 16 Jan 2019 12:33:51 -0800 Subject: [PATCH 1/3] Disable debugging configuration provider for now. For #4007 - Waiting for some fixes from the VS Code side. --- .../extension/configuration/debugConfigurationService.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/client/debugger/extension/configuration/debugConfigurationService.ts b/src/client/debugger/extension/configuration/debugConfigurationService.ts index d45bf0478982..a94463a2ab65 100644 --- a/src/client/debugger/extension/configuration/debugConfigurationService.ts +++ b/src/client/debugger/extension/configuration/debugConfigurationService.ts @@ -21,14 +21,18 @@ export class PythonDebugConfigurationService implements IDebugConfigurationServi constructor(@inject(IDebugConfigurationResolver) @named('attach') private readonly attachResolver: IDebugConfigurationResolver, @inject(IDebugConfigurationResolver) @named('launch') private readonly launchResolver: IDebugConfigurationResolver, @inject(IDebugConfigurationProviderFactory) private readonly providerFactory: IDebugConfigurationProviderFactory, + // tslint:disable-next-line:no-unused-variable @inject(IMultiStepInputFactory) private readonly multiStepFactory: IMultiStepInputFactory, @inject(IFileSystem) private readonly fs: IFileSystem) { } public async provideDebugConfigurations(folder: WorkspaceFolder | undefined, token?: CancellationToken): Promise { const config: Partial = {}; const state = { config, folder, token }; - const multiStep = this.multiStepFactory.create(); - await multiStep.run((input, s) => this.pickDebugConfiguration(input, s), state); + + // Disabled until configuration issues are addressed by VS Code. See #4007 + // const multiStep = this.multiStepFactory.create(); + // await multiStep.run((input, s) => this.pickDebugConfiguration(input, s), state); + if (Object.keys(state.config).length === 0) { return this.getDefaultDebugConfig(); } else { From 2799fc1475db6481ecf850b4ff79e80cfe5a1148 Mon Sep 17 00:00:00 2001 From: Derek Keeler Date: Wed, 16 Jan 2019 12:37:31 -0800 Subject: [PATCH 2/3] Remove news entry for disabled feature --- news/1 Enhancements/3321.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 news/1 Enhancements/3321.md diff --git a/news/1 Enhancements/3321.md b/news/1 Enhancements/3321.md deleted file mode 100644 index a51cefe4a567..000000000000 --- a/news/1 Enhancements/3321.md +++ /dev/null @@ -1 +0,0 @@ -Prompt user to select a debug configuration when generating the `launch.json`. From 72fc3eb87fbd84321b5eaa243db7390da3320454 Mon Sep 17 00:00:00 2001 From: Derek Keeler Date: Wed, 16 Jan 2019 15:02:30 -0800 Subject: [PATCH 3/3] Update tests for debugging provider to handle disabled feature --- .../debugConfigurationService.unit.test.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/test/debugger/extension/configuration/debugConfigurationService.unit.test.ts b/src/test/debugger/extension/configuration/debugConfigurationService.unit.test.ts index 24dc5c67d169..2c2593e3c5a2 100644 --- a/src/test/debugger/extension/configuration/debugConfigurationService.unit.test.ts +++ b/src/test/debugger/extension/configuration/debugConfigurationService.unit.test.ts @@ -114,7 +114,12 @@ suite('Debugging - Configuration Service', () => { multiStepInput.verifyAll(); expect(Object.keys(state.config)).to.be.lengthOf(0); }); - test('Ensure generated config is returned', async () => { + test('Ensure generated config is returned', async function () { + // Disable this test until this is resolved: + // Issue #4007: Disable debugging configuration provider temporarily + // tslint:disable-next-line:no-invalid-this + return this.skip(); + const expectedConfig = { yes: 'Updated' }; const multiStepInput = { run: (_, state) => { @@ -148,7 +153,10 @@ suite('Debugging - Configuration Service', () => { when(fs.readFile(jsFile)).thenResolve(JSON.stringify([expectedConfig])); const config = await configService.provideDebugConfigurations!({} as any); - multiStepFactory.verifyAll(); + // Disable this check until this is resolved: + // Issue #4007: Disable debugging configuration provider temporarily + // multiStepFactory.verifyAll(); + expect(config).to.deep.equal([expectedConfig]); }); });