Skip to content

Commit

Permalink
Hook up the justMyCode setting to cell debugging (#11689)
Browse files Browse the repository at this point in the history
* Hook up the justMyCode setting to cell debugging
Fix #8146

* Set git.branchProtectionPrompt
  • Loading branch information
roblourens authored Oct 18, 2022
1 parent 841a4f4 commit c4d5f39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"git.branchProtection": ["main", "release*"],
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",
"typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
"python.linting.enabled": false,
"python.testing.promptToConfigure": false,
Expand Down
7 changes: 4 additions & 3 deletions src/notebooks/debugger/debuggingManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -339,7 +340,7 @@ export class DebuggingManager
cell,
this.commandManager,
kernel!,
this.settings
this.configurationService
);
adapter.setDebuggingDelegate(controller);
this.notebookToRunByLineController.set(debug.document, controller);
Expand Down

0 comments on commit c4d5f39

Please sign in to comment.