Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move debugger files around so they use the appropriate folders #10373

Merged
merged 3 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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';
Expand Down Expand Up @@ -107,11 +106,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 @@ -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) {
Expand Down Expand Up @@ -69,6 +72,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