Skip to content

Commit de4e435

Browse files
final cleanup
1 parent 1d0c254 commit de4e435

5 files changed

Lines changed: 0 additions & 80 deletions

File tree

src/client/datascience/interactive-window/interactiveWindow.ts

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,6 @@ export class InteractiveWindow extends WebViewHost<IInteractiveWindowMapping> im
751751

752752
if (debug) {
753753
// Attach our debugger
754-
//await this.debuggerAttach();
755754
await this.jupyterDebugger.startDebugging(this.jupyterServer);
756755
}
757756

@@ -788,50 +787,13 @@ export class InteractiveWindow extends WebViewHost<IInteractiveWindowMapping> im
788787
this.applicationShell.showErrorMessage(message);
789788
} finally {
790789
if (debug) {
791-
//this.debuggerDetach();
792790
if (this.jupyterServer) {
793791
await this.jupyterDebugger.stopDebugging(this.jupyterServer);
794792
}
795793
}
796794
}
797795
}
798796

799-
//private async debuggerAttach(): Promise<void> {
800-
//if (this.jupyterServer) {
801-
//// Get our connection info
802-
//const debugConnectInfo = await this.jupyterServer.getDebuggerInfo();
803-
804-
//if (debugConnectInfo) {
805-
//// First connect the VSCode UI
806-
//const config: DebugConfiguration = {
807-
//name: 'IPython',
808-
//request: 'attach',
809-
//type: 'python',
810-
//port: debugConnectInfo.port,
811-
//host: debugConnectInfo.hostName
812-
//};
813-
814-
//await this.debugService.startDebugging(undefined, config);
815-
816-
//// tslint:disable-next-line:no-multiline-string
817-
//await this.jupyterServer.execute(`import ptvsd\r\nptvsd.wait_for_attach()`, Identifiers.EmptyFileName, 0, uuid(), undefined, true);
818-
819-
//// Then enable tracing
820-
//await this.jupyterServer.setDebugTracing(true);
821-
//}
822-
//}
823-
//}
824-
825-
//private async debuggerDetach(): Promise<void> {
826-
//// Disable tracing
827-
//if (this.jupyterServer) {
828-
//await this.jupyterServer.setDebugTracing(false);
829-
//}
830-
831-
//// Stop our debugging UI session, no await as we just want it stopped
832-
//this.commandManager.executeCommand('workbench.action.debug.stop');
833-
//}
834-
835797
private setStatus = (message: string): Disposable => {
836798
const result = this.statusProvider.set(message);
837799
this.potentiallyUnfinishedStatus.push(result);

src/client/datascience/jupyter/jupyterServer.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -553,34 +553,11 @@ export class JupyterServerBase implements INotebookServer {
553553
CodeSnippits.MatplotLibInit,
554554
cancelToken
555555
);
556-
557-
// If our setting for this is turned on, then import the debugger and enable it to attach
558-
//if (this.launchInfo && this.launchInfo.enableDebugging) {
559-
//this.debuggerConnectInfo = await this.enableDebugging();
560-
//}
561556
} catch (e) {
562557
traceWarning(e);
563558
}
564559
}
565560

566-
//private async enableDebugging(): Promise<IDebuggerConnectInfo | undefined> {
567-
//// tslint:disable-next-line:no-multiline-string
568-
//const enableDebuggerResults = await this.executeSilently(`import sys\r\nsys.path.append('d:/ptvsd-drop/kdrop/src')\r\nimport os\r\nos.environ["PTVSD_LOG_DIR"] = "d:/note_dbg/logs"\r\nimport ptvsd\r\nptvsd.enable_attach(('localhost', 0))`);
569-
////const enableDebuggerResults = await this.executeSilently(`import ptvsd\r\nptvsd.enable_attach(('localhost', 0))`);
570-
571-
//const enableAttachString = enableDebuggerResults.length > 0 ? this.extractStreamOutput(enableDebuggerResults[0]).trimQuotes() : '';
572-
//traceInfo(enableAttachString);
573-
574-
//const debugInfoRegEx = /\('(.*?)', ([0-9]*)\)/;
575-
576-
//const debugInfoMatch = debugInfoRegEx.exec(enableAttachString);
577-
//if (debugInfoMatch) {
578-
//return { hostName: debugInfoMatch[1], port: parseInt(debugInfoMatch[2], 10) };
579-
//}
580-
581-
//return undefined;
582-
//}
583-
584561
private combineObservables = (...args: Observable<ICell>[]): Observable<ICell[]> => {
585562
return new Observable<ICell[]>(subscriber => {
586563
// When all complete, we have our results

src/client/datascience/jupyter/liveshare/guestJupyterServer.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@ export class GuestJupyterServer
9595
return deferred.promise;
9696
}
9797

98-
public setDebugTracing(_tracingOn: boolean): Promise<void> {
99-
// Ignore on guest side for now
100-
return Promise.resolve();
101-
}
102-
103-
public async getDebuggerInfo(): Promise<IDebuggerConnectInfo | undefined> {
104-
return Promise.resolve(undefined);
105-
}
106-
10798
public setInitialDirectory(_directory: string): Promise<void> {
10899
// Ignore this command on this side
109100
return Promise.resolve();

src/client/datascience/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ export interface INotebookServer extends IAsyncDisposable {
9191
getConnectionInfo(): IConnection | undefined;
9292
getSysInfo() : Promise<ICell | undefined>;
9393
setMatplotLibStyle(useDark: boolean) : Promise<void>;
94-
//setDebugTracing(tracingOn: boolean): Promise<void>;
95-
//getDebuggerInfo(): Promise<IDebuggerConnectInfo | undefined>;
9694
}
9795

9896
export interface INotebookServerOptions {

src/test/datascience/execution.unit.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,6 @@ class MockJupyterServer implements INotebookServer {
118118
return Promise.resolve(undefined);
119119
}
120120

121-
public setDebugTracing(_tracingOn: boolean): Promise<void> {
122-
return Promise.resolve();
123-
}
124-
125-
public async getDebuggerInfo(): Promise<IDebuggerConnectInfo | undefined> {
126-
return Promise.resolve(undefined);
127-
}
128-
129121
public interruptKernel(_timeout: number) : Promise<InterruptResult> {
130122
throw new Error('Method not implemented');
131123
}

0 commit comments

Comments
 (0)