diff --git a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts index f61a76d2404..dd7cba913d4 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts @@ -36,11 +36,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDebugService); this._toDispose = []; this._toDispose.push(debugService.onDidNewSession(session => { - if (session) { - this._proxy.$acceptDebugSessionStarted(this.getSessionDto(session)); - } else { - console.error('undefined session received in onDidNewSession'); - } + this._proxy.$acceptDebugSessionStarted(this.getSessionDto(session)); })); // Need to start listening early to new session events because a custom event can come while a session is initialising this._toDispose.push(debugService.onWillNewSession(session => { diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index 1ffffaaa231..394527812e6 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -601,11 +601,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape { public async $acceptDebugSessionStarted(sessionDto: IDebugSessionDto): Promise { const session = await this.getSession(sessionDto); - if (session) { - this._onDidStartDebugSession.fire(session); - } else { - console.error('undefined session received in acceptDebugSessionStarted'); // should not happen (but see #69128) - } + this._onDidStartDebugSession.fire(session); } public async $acceptDebugSessionTerminated(sessionDto: IDebugSessionDto): Promise {