Debug API for tracking current debug session; fixes #30157

This commit is contained in:
Andre Weinand
2017-07-06 00:26:17 +02:00
parent 78b912ee3f
commit 5eb21eaa8a
7 changed files with 66 additions and 2 deletions

View File

@@ -20,9 +20,17 @@ export class MainThreadDebugService extends MainThreadDebugServiceShape {
@IDebugService private debugService: IDebugService
) {
super();
this._proxy = threadService.get(ExtHostContext.ExtHostDebugService);
this._toDispose = [];
this._toDispose.push(debugService.onDidEndProcess(proc => this._proxy.$acceptDebugSessionTerminated(<DebugSessionUUID>proc.getId(), proc.configuration.type, proc.name)));
this._toDispose.push(debugService.getViewModel().onDidFocusProcess(proc => {
if (proc) {
this._proxy.$acceptDebugSessionActiveChanged(<DebugSessionUUID>proc.getId(), proc.configuration.type, proc.name);
} else {
this._proxy.$acceptDebugSessionActiveChanged(undefined);
}
}));
}
public dispose(): void {