Skip to content

Commit

Permalink
Move debugger files around so they use the appropriate folders (#10373)
Browse files Browse the repository at this point in the history
* Move debugger files around to eliminate notebooks reference

* Update telemetry
  • Loading branch information
rchiodo authored Jun 8, 2022
1 parent 1f1105b commit 2f4c4fb
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 32 deletions.
6 changes: 3 additions & 3 deletions TELEMETRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down Expand Up @@ -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'
);
Expand Down Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/interactive-window/debugger/jupyter/debuggingManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 1 addition & 6 deletions src/kernels/debugger/kernelDebugAdapterBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
6 changes: 0 additions & 6 deletions src/kernels/serviceRegistry.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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 { KernelDependencyService } from './kernelDependencyService.node';
import { JupyterPaths } from './raw/finder/jupyterPaths.node';
Expand Down Expand Up @@ -104,11 +103,6 @@ export function registerTypes(serviceManager: IServiceManager, isDevMode: boolea
MultiplexingDebugService,
Identifiers.MULTIPLEXING_DEBUGSERVICE
);
serviceManager.addSingleton<IJupyterDebugService>(
IJupyterDebugService,
JupyterDebugService,
Identifiers.RUN_BY_LINE_DEBUGSERVICE
);
serviceManager.add<IJupyterVariableDataProvider>(IJupyterVariableDataProvider, JupyterVariableDataProvider);
serviceManager.addSingleton<IJupyterVariableDataProviderFactory>(
IJupyterVariableDataProviderFactory,
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/debugger/debugCellControllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/notebooks/debugger/debuggingManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/notebooks/debugger/runByLineController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions src/notebooks/serviceRegistry.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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) {
Expand Down Expand Up @@ -64,6 +67,11 @@ export function registerTypes(serviceManager: IServiceManager) {
RemoteKernelControllerWatcher
);
serviceManager.addSingleton<ITracebackFormatter>(ITracebackFormatter, NotebookTracebackFormatter);
serviceManager.addSingleton<IJupyterDebugService>(
IJupyterDebugService,
JupyterDebugService,
Identifiers.RUN_BY_LINE_DEBUGSERVICE
);
serviceManager.addSingleton<NotebookIPyWidgetCoordinator>(
NotebookIPyWidgetCoordinator,
NotebookIPyWidgetCoordinator
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/test/debugger/jupyter/helpers.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 2f4c4fb

Please sign in to comment.