diff --git a/TELEMETRY.md b/TELEMETRY.md index 60bec8d8244..695d35cb534 100644 --- a/TELEMETRY.md +++ b/TELEMETRY.md @@ -421,7 +421,7 @@ No properties for event ## Locations Used -[src/kernels/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/debugger/debuggingManagerBase.ts) +[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) ```typescript ); @@ -505,7 +505,7 @@ No properties for event ## Locations Used -[src/kernels/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/debugger/debuggingManagerBase.ts) +[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) ```typescript 'https://github.com/microsoft/vscode-jupyter/wiki/Setting-Up-Run-by-Line-and-Debugging-for-Notebooks' ); @@ -583,7 +583,7 @@ No description provided ## Locations Used -[src/kernels/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/debugger/debuggingManagerBase.ts) +[src/notebooks/debugger/debuggingManagerBase.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/debugger/debuggingManagerBase.ts) ```typescript } diff --git a/src/interactive-window/debugger/jupyter/debugCellControllers.ts b/src/interactive-window/debugger/jupyter/debugCellControllers.ts index c8482b130d6..bcdeb2fd90b 100644 --- a/src/interactive-window/debugger/jupyter/debugCellControllers.ts +++ b/src/interactive-window/debugger/jupyter/debugCellControllers.ts @@ -6,7 +6,7 @@ import { DebugProtocol } from 'vscode-debugprotocol'; import { IDebuggingDelegate, IKernelDebugAdapter } from '../../../kernels/debugger/types'; import { DebuggingTelemetry } from '../../../kernels/debugger/constants'; import { IKernel } from '../../../kernels/types'; -import { cellDebugSetup } from '../../../notebooks/debugger/helper'; +import { cellDebugSetup } from '../../../kernels/debugger/helper'; import { createDeferred } from '../../../platform/common/utils/async'; import { sendTelemetryEvent } from '../../../telemetry'; import { getInteractiveCellMetadata } from '../../helpers'; diff --git a/src/interactive-window/debugger/jupyter/debuggingManager.ts b/src/interactive-window/debugger/jupyter/debuggingManager.ts index 7a559275c02..9fce5ba2daf 100644 --- a/src/interactive-window/debugger/jupyter/debuggingManager.ts +++ b/src/interactive-window/debugger/jupyter/debuggingManager.ts @@ -21,7 +21,7 @@ import { IDebugLocationTrackerFactory } from '../../../kernels/debugger/types'; import { IKernelProvider } from '../../../kernels/types'; -import { IpykernelCheckResult, assertIsDebugConfig } from '../../../notebooks/debugger/helper'; +import { IpykernelCheckResult, assertIsDebugConfig } from '../../../kernels/debugger/helper'; import { KernelDebugAdapter } from './kernelDebugAdapter'; import { INotebookControllerManager } from '../../../notebooks/types'; import { IExtensionSingleActivationService } from '../../../platform/activation/types'; @@ -31,7 +31,7 @@ import { DataScience } from '../../../platform/common/utils/localize'; import { traceInfoIfCI, traceInfo, traceError } from '../../../platform/logging'; import * as path from '../../../platform/vscode-path/path'; import { DebugCellController } from './debugCellControllers'; -import { DebuggingManagerBase } from '../../../kernels/debugger/debuggingManagerBase'; +import { DebuggingManagerBase } from '../../../notebooks/debugger/debuggingManagerBase'; import { IConfigurationService } from '../../../platform/common/types'; import { IFileGeneratedCodes } from '../../editor-integration/types'; import { buildSourceMap } from '../helper'; diff --git a/src/notebooks/debugger/helper.ts b/src/kernels/debugger/helper.ts similarity index 98% rename from src/notebooks/debugger/helper.ts rename to src/kernels/debugger/helper.ts index 4493f549fe3..ed3014685ea 100644 --- a/src/notebooks/debugger/helper.ts +++ b/src/kernels/debugger/helper.ts @@ -2,8 +2,8 @@ // Licensed under the MIT License. import { DebugProtocol } from 'vscode-debugprotocol'; -import { IKernelDebugAdapter, IKernelDebugAdapterConfig, KernelDebugMode } from '../../kernels/debugger/types'; -import { IKernel } from '../../kernels/types'; +import { IKernelDebugAdapter, IKernelDebugAdapterConfig, KernelDebugMode } from './types'; +import { IKernel } from '../types'; export enum IpykernelCheckResult { Unknown, diff --git a/src/kernels/debugger/kernelDebugAdapterBase.ts b/src/kernels/debugger/kernelDebugAdapterBase.ts index 8d0ac5ce8fd..b97daa2cf16 100644 --- a/src/kernels/debugger/kernelDebugAdapterBase.ts +++ b/src/kernels/debugger/kernelDebugAdapterBase.ts @@ -35,12 +35,7 @@ import { } from './types'; import { sendTelemetryEvent } from '../../telemetry'; import { traceError, traceInfo, traceInfoIfCI, traceVerbose, traceWarning } from '../../platform/logging'; -import { - assertIsDebugConfig, - isShortNamePath, - shortNameMatchesLongName, - getMessageSourceAndHookIt -} from '../../notebooks/debugger/helper'; +import { assertIsDebugConfig, isShortNamePath, shortNameMatchesLongName, getMessageSourceAndHookIt } from './helper'; import { IDisposable } from '../../platform/common/types'; import { executeSilently } from '../helpers'; diff --git a/src/kernels/serviceRegistry.node.ts b/src/kernels/serviceRegistry.node.ts index b3b0fba1224..dc63dc93ed9 100644 --- a/src/kernels/serviceRegistry.node.ts +++ b/src/kernels/serviceRegistry.node.ts @@ -13,7 +13,6 @@ import { IProtocolParser } from '../platform/debugger/extension/types.node'; import { IServiceManager } from '../platform/ioc/types'; import { setSharedProperty } from '../telemetry'; import { InteractiveWindowDebugger } from '../interactive-window/debugger/interactiveWindowDebugger.node'; -import { JupyterDebugService } from '../notebooks/debugger/jupyterDebugService.node'; import { registerInstallerTypes } from './installer/serviceRegistry.node'; import { KernelCommandListener } from './kernelCommandListener'; import { KernelDependencyService } from './kernelDependencyService.node'; @@ -107,11 +106,6 @@ export function registerTypes(serviceManager: IServiceManager, isDevMode: boolea MultiplexingDebugService, Identifiers.MULTIPLEXING_DEBUGSERVICE ); - serviceManager.addSingleton( - IJupyterDebugService, - JupyterDebugService, - Identifiers.RUN_BY_LINE_DEBUGSERVICE - ); serviceManager.add(IJupyterVariableDataProvider, JupyterVariableDataProvider); serviceManager.addSingleton( IJupyterVariableDataProviderFactory, diff --git a/src/notebooks/debugger/debugCellControllers.ts b/src/notebooks/debugger/debugCellControllers.ts index d2e59147df0..e98e32f6fa9 100644 --- a/src/notebooks/debugger/debugCellControllers.ts +++ b/src/notebooks/debugger/debugCellControllers.ts @@ -7,7 +7,7 @@ import { ICommandManager } from '../../platform/common/application/types'; import { IKernel } from '../../kernels/types'; import { sendTelemetryEvent } from '../../telemetry'; import { DebuggingTelemetry } from '../../kernels/debugger/constants'; -import { cellDebugSetup } from './helper'; +import { cellDebugSetup } from '../../kernels/debugger/helper'; import { IDebuggingDelegate, IKernelDebugAdapter } from '../../kernels/debugger/types'; export class DebugCellController implements IDebuggingDelegate { diff --git a/src/notebooks/debugger/debuggingManager.ts b/src/notebooks/debugger/debuggingManager.ts index db90ddbef24..2853a72d219 100644 --- a/src/notebooks/debugger/debuggingManager.ts +++ b/src/notebooks/debugger/debuggingManager.ts @@ -30,9 +30,9 @@ import { traceError, traceInfo, traceInfoIfCI } from '../../platform/logging'; import { DataScience } from '../../platform/common/utils/localize'; import { DebugCellController } from './debugCellControllers'; import { KernelDebugAdapter } from './kernelDebugAdapter'; -import { assertIsDebugConfig, IpykernelCheckResult } from './helper'; +import { assertIsDebugConfig, IpykernelCheckResult } from '../../kernels/debugger/helper'; import { IDebuggingManager, IKernelDebugAdapterConfig, KernelDebugMode } from '../../kernels/debugger/types'; -import { DebuggingManagerBase } from '../../kernels/debugger/debuggingManagerBase'; +import { DebuggingManagerBase } from './debuggingManagerBase'; /** * The DebuggingManager maintains the mapping between notebook documents and debug sessions. diff --git a/src/kernels/debugger/debuggingManagerBase.ts b/src/notebooks/debugger/debuggingManagerBase.ts similarity index 94% rename from src/kernels/debugger/debuggingManagerBase.ts rename to src/notebooks/debugger/debuggingManagerBase.ts index 6e8452d045d..f53e125b94c 100644 --- a/src/kernels/debugger/debuggingManagerBase.ts +++ b/src/notebooks/debugger/debuggingManagerBase.ts @@ -14,18 +14,18 @@ import { EventEmitter, NotebookCell } from 'vscode'; -import { IKernel, IKernelProvider } from '../types'; +import { IKernel, IKernelProvider } from '../../kernels/types'; import { IDisposable } from '../../platform/common/types'; import { IApplicationShell, ICommandManager, IVSCodeNotebook } from '../../platform/common/application/types'; -import { DebuggingTelemetry } from './constants'; +import { DebuggingTelemetry } from '../../kernels/debugger/constants'; import { sendTelemetryEvent } from '../../telemetry'; import { traceError, traceInfoIfCI } from '../../platform/logging'; import { DataScience } from '../../platform/common/utils/localize'; -import { IKernelDebugAdapterConfig } from './types'; -import { Debugger } from '../../notebooks/debugger/debugger'; -import { KernelDebugAdapterBase } from './kernelDebugAdapterBase'; -import { INotebookControllerManager } from '../../notebooks/types'; -import { IpykernelCheckResult, isUsingIpykernel6OrLater } from '../../notebooks/debugger/helper'; +import { IKernelDebugAdapterConfig } from '../../kernels/debugger/types'; +import { Debugger } from '../../platform/debugger/debugger'; +import { KernelDebugAdapterBase } from '../../kernels/debugger/kernelDebugAdapterBase'; +import { INotebookControllerManager } from '../types'; +import { IpykernelCheckResult, isUsingIpykernel6OrLater } from '../../kernels/debugger/helper'; /** * The DebuggingManager maintains the mapping between notebook documents and debug sessions. diff --git a/src/notebooks/debugger/runByLineController.ts b/src/notebooks/debugger/runByLineController.ts index 18e3ecccecc..98a6944f393 100644 --- a/src/notebooks/debugger/runByLineController.ts +++ b/src/notebooks/debugger/runByLineController.ts @@ -13,7 +13,7 @@ import { DebuggingTelemetry } from '../../kernels/debugger/constants'; import { traceInfoIfCI, traceVerbose } from '../../platform/logging'; import { noop } from '../../platform/common/utils/misc'; import { Commands } from '../../platform/common/constants'; -import { cellDebugSetup } from './helper'; +import { cellDebugSetup } from '../../kernels/debugger/helper'; import { IDebuggingDelegate, IKernelDebugAdapter, KernelDebugMode } from '../../kernels/debugger/types'; export class RunByLineController implements IDebuggingDelegate { diff --git a/src/notebooks/serviceRegistry.node.ts b/src/notebooks/serviceRegistry.node.ts index e016f42d02a..cbe8a87ead8 100644 --- a/src/notebooks/serviceRegistry.node.ts +++ b/src/notebooks/serviceRegistry.node.ts @@ -25,6 +25,9 @@ import { IntellisenseProvider } from '../intellisense/intellisenseProvider.node' import { RemoteKernelControllerWatcher } from './controllers/remoteKernelControllerWatcher'; import { ITracebackFormatter } from '../kernels/types'; import { NotebookTracebackFormatter } from './outputs/tracebackFormatter'; +import { IJupyterDebugService } from '../kernels/debugger/types'; +import { Identifiers } from '../platform/common/constants'; +import { JupyterDebugService } from './debugger/jupyterDebugService.node'; import { NotebookIPyWidgetCoordinator } from './controllers/notebookIPyWidgetCoordinator'; export function registerTypes(serviceManager: IServiceManager) { @@ -69,6 +72,11 @@ export function registerTypes(serviceManager: IServiceManager) { RemoteKernelControllerWatcher ); serviceManager.addSingleton(ITracebackFormatter, NotebookTracebackFormatter); + serviceManager.addSingleton( + IJupyterDebugService, + JupyterDebugService, + Identifiers.RUN_BY_LINE_DEBUGSERVICE + ); serviceManager.addSingleton( NotebookIPyWidgetCoordinator, NotebookIPyWidgetCoordinator diff --git a/src/notebooks/debugger/debugger.ts b/src/platform/debugger/debugger.ts similarity index 100% rename from src/notebooks/debugger/debugger.ts rename to src/platform/debugger/debugger.ts diff --git a/src/test/debugger/jupyter/helpers.unit.test.ts b/src/test/debugger/jupyter/helpers.unit.test.ts index 00dfcd59a90..e5301595fdf 100644 --- a/src/test/debugger/jupyter/helpers.unit.test.ts +++ b/src/test/debugger/jupyter/helpers.unit.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { expect } from 'chai'; -import { isShortNamePath } from '../../../notebooks/debugger/helper'; +import { isShortNamePath } from '../../../kernels/debugger/helper'; suite('Debugging - Helpers', () => { suite('isShortNamePath', async () => {