Skip to content
Merged
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
21 changes: 11 additions & 10 deletions src/client/datascience/jupyter/jupyterDebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
'use strict';
import { nbformat } from '@jupyterlab/coreutils';
import { inject, injectable } from 'inversify';
import * as path from 'path';
import * as uuid from 'uuid/v4';
import { DebugConfiguration } from 'vscode';
import * as vsls from 'vsls/vscode';

import { IApplicationShell, ICommandManager, IDebugService, IWorkspaceService } from '../../common/application/types';
import { traceError, traceInfo, traceWarning } from '../../common/logger';
import { IPlatformService } from '../../common/platform/types';
import { IConfigurationService } from '../../common/types';
import * as localize from '../../common/utils/localize';
import { EXTENSION_ROOT_DIR } from '../../constants';
import { captureTelemetry, sendTelemetryEvent } from '../../telemetry';
import { concatMultilineStringOutput } from '../common';
import { Identifiers, Telemetry } from '../constants';
Expand Down Expand Up @@ -175,7 +176,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener {
return result;
}

private calculatePtvsdPathList(_notebook: INotebook): string | undefined {
private calculatePtvsdPathList(notebook: INotebook): string | undefined {
const extraPaths: string[] = [];

// Add the settings path first as it takes precedence over the ptvsd extension path
Expand All @@ -194,14 +195,14 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener {
// installed locally by the extension
// Actually until this is resolved: https://github.com/microsoft/vscode-python/issues/7615, skip adding
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this comment here.

// this path.
// const connectionInfo = notebook.server.getConnectionInfo();
// if (connectionInfo && connectionInfo.localLaunch) {
// let localPath = path.join(EXTENSION_ROOT_DIR, 'pythonFiles', 'lib', 'python');
// if (this.platform.isWindows) {
// localPath = localPath.replace('\\', '\\\\');
// }
// extraPaths.push(localPath);
// }
const connectionInfo = notebook.server.getConnectionInfo();
if (connectionInfo && connectionInfo.localLaunch) {
let localPath = path.join(EXTENSION_ROOT_DIR, 'pythonFiles', 'lib', 'python');
if (this.platform.isWindows) {
localPath = localPath.replace('\\', '\\\\');
}
extraPaths.push(localPath);
}

if (extraPaths && extraPaths.length > 0) {
return extraPaths.reduce((totalPath, currentPath) => {
Expand Down