-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
105 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Alert boxes of the form `<div style="alert alert-danger">` are now styled as colored boxes, to match how they are in Jupyter. | ||
(thanks [Eric Wieser](https://github.com/eric-wieser/)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/platform/debugger/jupyter/notebook/debugCellControllers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
import { DebugProtocolMessage, NotebookCell } from 'vscode'; | ||
import { DebugProtocol } from 'vscode-debugprotocol'; | ||
import { ICommandManager } from '../../../common/application/types'; | ||
import { IKernel } from '../../../../kernels/types'; | ||
import { sendTelemetryEvent } from '../../../../telemetry'; | ||
import { DebuggingTelemetry } from '../../constants'; | ||
import { IDebuggingDelegate, IKernelDebugAdapter } from '../../types'; | ||
import { cellDebugSetup } from '../helper'; | ||
|
||
export class DebugCellController implements IDebuggingDelegate { | ||
constructor( | ||
private readonly debugAdapter: IKernelDebugAdapter, | ||
public readonly debugCell: NotebookCell, | ||
private readonly kernel: IKernel, | ||
private readonly commandManager: ICommandManager | ||
) { | ||
sendTelemetryEvent(DebuggingTelemetry.successfullyStartedRunAndDebugCell); | ||
} | ||
|
||
public async willSendEvent(_msg: DebugProtocolMessage): Promise<boolean> { | ||
return false; | ||
} | ||
|
||
public async willSendRequest(request: DebugProtocol.Request): Promise<void> { | ||
if (request.command === 'configurationDone') { | ||
await cellDebugSetup(this.kernel, this.debugAdapter); | ||
|
||
void this.commandManager.executeCommand('notebook.cell.execute', { | ||
ranges: [{ start: this.debugCell.index, end: this.debugCell.index + 1 }], | ||
document: this.debugCell.document.uri | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters