From 4fe12e5eabf7430909d6fc3996c807af31761515 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 6 Apr 2018 15:30:30 -0700 Subject: [PATCH 1/3] Pass necessary flags to ptvsd during attach --- src/client/debugger/Common/Contracts.ts | 3 ++- src/client/debugger/configProviders/pythonV2Provider.ts | 3 +++ src/test/debugger/configProvider/provider.attach.test.ts | 3 +++ src/test/index.ts | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/client/debugger/Common/Contracts.ts b/src/client/debugger/Common/Contracts.ts index cd32d1304dfd..2e0482186698 100644 --- a/src/client/debugger/Common/Contracts.ts +++ b/src/client/debugger/Common/Contracts.ts @@ -39,7 +39,8 @@ export enum DebugOptions { BreakOnSystemExitZero = 'BreakOnSystemExitZero', Sudo = 'Sudo', Pyramid = 'Pyramid', - FixFilePathCase = 'FixFilePathCase' + FixFilePathCase = 'FixFilePathCase', + FilePathIsCaseSensitive = 'FilePathIsCaseSensitive' } export interface ExceptionHandling { diff --git a/src/client/debugger/configProviders/pythonV2Provider.ts b/src/client/debugger/configProviders/pythonV2Provider.ts index 4c6b74d7faac..90aa7f683198 100644 --- a/src/client/debugger/configProviders/pythonV2Provider.ts +++ b/src/client/debugger/configProviders/pythonV2Provider.ts @@ -41,6 +41,9 @@ export class PythonV2DebugConfigurationProvider extends BaseConfigurationProvide if (this.serviceContainer.get(IPlatformService).isWindows && isLocalHost) { debugConfiguration.debugOptions.push(DebugOptions.FixFilePathCase); } + if (!this.serviceContainer.get(IPlatformService).isWindows) { + debugConfiguration.debugOptions.push(DebugOptions.FilePathIsCaseSensitive); + } if (!debugConfiguration.pathMappings) { debugConfiguration.pathMappings = []; diff --git a/src/test/debugger/configProvider/provider.attach.test.ts b/src/test/debugger/configProvider/provider.attach.test.ts index 596cc907c7dc..0dd7f8df9cdc 100644 --- a/src/test/debugger/configProvider/provider.attach.test.ts +++ b/src/test/debugger/configProvider/provider.attach.test.ts @@ -36,6 +36,9 @@ enum OS { if (os.value === OS.Windows && provider.debugType === 'pythonExperimental') { debugOptionsAvailable.push(DebugOptions.FixFilePathCase); } + if (os.value !== OS.Windows && provider.debugType === 'pythonExperimental') { + debugOptionsAvailable.push(DebugOptions.FilePathIsCaseSensitive); + } setup(() => { serviceContainer = TypeMoq.Mock.ofType(); platformService = TypeMoq.Mock.ofType(); diff --git a/src/test/index.ts b/src/test/index.ts index 135ca5d8b6c1..7b0937d0097d 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -13,7 +13,7 @@ process.env.IS_MULTI_ROOT_TEST = IS_MULTI_ROOT_TEST.toString(); // If running on CI server and we're running the debugger tests, then ensure we only run debug tests. // We do this to ensure we only run debugger test, as debugger tests are very flaky on CI. // So the solution is to run them separately and first on CI. -const grep = IS_CI_SERVER && IS_CI_SERVER_TEST_DEBUGGER ? 'Debug' : undefined; +const grep = IS_CI_SERVER && IS_CI_SERVER_TEST_DEBUGGER ? 'Debug' : 'Debugging - Config Provider attach'; // You can directly control Mocha options by uncommenting the following lines. // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info. From 937ac03ad3c1f7c016f2b002c0aacfa3c4b47ee5 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 6 Apr 2018 15:31:13 -0700 Subject: [PATCH 2/3] revert unecessary change --- src/test/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/index.ts b/src/test/index.ts index 7b0937d0097d..135ca5d8b6c1 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -13,7 +13,7 @@ process.env.IS_MULTI_ROOT_TEST = IS_MULTI_ROOT_TEST.toString(); // If running on CI server and we're running the debugger tests, then ensure we only run debug tests. // We do this to ensure we only run debugger test, as debugger tests are very flaky on CI. // So the solution is to run them separately and first on CI. -const grep = IS_CI_SERVER && IS_CI_SERVER_TEST_DEBUGGER ? 'Debug' : 'Debugging - Config Provider attach'; +const grep = IS_CI_SERVER && IS_CI_SERVER_TEST_DEBUGGER ? 'Debug' : undefined; // You can directly control Mocha options by uncommenting the following lines. // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info. From 69bb1c8ace7a62501e2291e456f30c1088a4816e Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 9 Apr 2018 15:00:48 -0700 Subject: [PATCH 3/3] rename setting passed into PTVSD --- src/client/debugger/Common/Contracts.ts | 2 +- src/client/debugger/configProviders/pythonV2Provider.ts | 4 ++-- src/test/debugger/configProvider/provider.attach.test.ts | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/debugger/Common/Contracts.ts b/src/client/debugger/Common/Contracts.ts index 2e0482186698..989568fa731a 100644 --- a/src/client/debugger/Common/Contracts.ts +++ b/src/client/debugger/Common/Contracts.ts @@ -40,7 +40,7 @@ export enum DebugOptions { Sudo = 'Sudo', Pyramid = 'Pyramid', FixFilePathCase = 'FixFilePathCase', - FilePathIsCaseSensitive = 'FilePathIsCaseSensitive' + WindowsClient = 'WindowsClient' } export interface ExceptionHandling { diff --git a/src/client/debugger/configProviders/pythonV2Provider.ts b/src/client/debugger/configProviders/pythonV2Provider.ts index 90aa7f683198..47e587daabc7 100644 --- a/src/client/debugger/configProviders/pythonV2Provider.ts +++ b/src/client/debugger/configProviders/pythonV2Provider.ts @@ -41,8 +41,8 @@ export class PythonV2DebugConfigurationProvider extends BaseConfigurationProvide if (this.serviceContainer.get(IPlatformService).isWindows && isLocalHost) { debugConfiguration.debugOptions.push(DebugOptions.FixFilePathCase); } - if (!this.serviceContainer.get(IPlatformService).isWindows) { - debugConfiguration.debugOptions.push(DebugOptions.FilePathIsCaseSensitive); + if (this.serviceContainer.get(IPlatformService).isWindows) { + debugConfiguration.debugOptions.push(DebugOptions.WindowsClient); } if (!debugConfiguration.pathMappings) { diff --git a/src/test/debugger/configProvider/provider.attach.test.ts b/src/test/debugger/configProvider/provider.attach.test.ts index 0dd7f8df9cdc..30d1a4192800 100644 --- a/src/test/debugger/configProvider/provider.attach.test.ts +++ b/src/test/debugger/configProvider/provider.attach.test.ts @@ -35,9 +35,7 @@ enum OS { const debugOptionsAvailable = [DebugOptions.RedirectOutput]; if (os.value === OS.Windows && provider.debugType === 'pythonExperimental') { debugOptionsAvailable.push(DebugOptions.FixFilePathCase); - } - if (os.value !== OS.Windows && provider.debugType === 'pythonExperimental') { - debugOptionsAvailable.push(DebugOptions.FilePathIsCaseSensitive); + debugOptionsAvailable.push(DebugOptions.WindowsClient); } setup(() => { serviceContainer = TypeMoq.Mock.ofType();