From 30147924f138571ecee40942163b5d8d65cc8589 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 17 Oct 2022 20:56:57 -0700 Subject: [PATCH] Hook up the justMyCode setting to cell debugging Fix #8146 --- src/notebooks/debugger/debuggingManager.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/notebooks/debugger/debuggingManager.ts b/src/notebooks/debugger/debuggingManager.ts index ba8def1dee6..2b25cdeea7d 100644 --- a/src/notebooks/debugger/debuggingManager.ts +++ b/src/notebooks/debugger/debuggingManager.ts @@ -64,7 +64,7 @@ export class DebuggingManager @inject(ICommandManager) commandManager: ICommandManager, @inject(IApplicationShell) appShell: IApplicationShell, @inject(IVSCodeNotebook) vscNotebook: IVSCodeNotebook, - @inject(IConfigurationService) private readonly settings: IConfigurationService, + @inject(IConfigurationService) private readonly configurationService: IConfigurationService, @inject(IPlatformService) private readonly platform: IPlatformService, @inject(IDebugService) private readonly debugService: IDebugService, @inject(IServiceContainer) serviceContainer: IServiceContainer @@ -268,11 +268,12 @@ export class DebuggingManager mode: KernelDebugMode.Cell | KernelDebugMode.RunByLine, cell: NotebookCell ) { + const settings = this.configurationService.getSettings(doc.uri); const config: IKernelDebugAdapterConfig = { type: pythonKernelDebugAdapter, name: path.basename(doc.uri.toString()), request: 'attach', - justMyCode: true, + justMyCode: settings.debugJustMyCode, // add a property to the config to know if the session is runByLine __mode: mode, __cellIndex: cell.index @@ -339,7 +340,7 @@ export class DebuggingManager cell, this.commandManager, kernel!, - this.settings + this.configurationService ); adapter.setDebuggingDelegate(controller); this.notebookToRunByLineController.set(debug.document, controller);