diff --git a/news/2 Fixes/2299.md b/news/2 Fixes/2299.md new file mode 100644 index 000000000000..05672334474d --- /dev/null +++ b/news/2 Fixes/2299.md @@ -0,0 +1 @@ +Add support for breaking into the first line of code in the new debugger. \ No newline at end of file diff --git a/src/client/debugger/Common/Contracts.ts b/src/client/debugger/Common/Contracts.ts index a5eac0ed284a..79c1953f913c 100644 --- a/src/client/debugger/Common/Contracts.ts +++ b/src/client/debugger/Common/Contracts.ts @@ -43,7 +43,8 @@ export enum DebugOptions { Pyramid = 'Pyramid', FixFilePathCase = 'FixFilePathCase', WindowsClient = 'WindowsClient', - UnixClient = 'UnixClient' + UnixClient = 'UnixClient', + StopOnEntry = 'StopOnEntry' } export interface ExceptionHandling { @@ -60,6 +61,7 @@ export interface AdditionalLaunchDebugOptions { debugStdLib?: boolean; sudo?: boolean; pyramid?: boolean; + stopOnEntry?: boolean; } export interface AdditionalAttachDebugOptions { diff --git a/src/client/debugger/DebugClients/LocalDebugClient.ts b/src/client/debugger/DebugClients/LocalDebugClient.ts index 5ee1dffa4eca..532cc1e5df6d 100644 --- a/src/client/debugger/DebugClients/LocalDebugClient.ts +++ b/src/client/debugger/DebugClients/LocalDebugClient.ts @@ -20,6 +20,7 @@ import { DebugClientHelper } from './helper'; const VALID_DEBUG_OPTIONS = [ 'RedirectOutput', 'DebugStdLib', + 'stopOnEntry', 'BreakOnSystemExitZero', 'DjangoDebugging', 'Django']; diff --git a/src/client/debugger/configProviders/pythonV2Provider.ts b/src/client/debugger/configProviders/pythonV2Provider.ts index b2d64f406faf..54f64e297397 100644 --- a/src/client/debugger/configProviders/pythonV2Provider.ts +++ b/src/client/debugger/configProviders/pythonV2Provider.ts @@ -25,6 +25,9 @@ export class PythonV2DebugConfigurationProvider extends BaseConfigurationProvide if (debugConfiguration.debugStdLib) { this.debugOption(debugOptions, DebugOptions.DebugStdLib); } + if (debugConfiguration.stopOnEntry) { + this.debugOption(debugOptions, DebugOptions.StopOnEntry); + } if (debugConfiguration.django) { this.debugOption(debugOptions, DebugOptions.Django); }