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

@@ -463,12 +463,19 @@ export function createApiFactory(
// namespace: debug
const debug: typeof vscode.debug = {
get activeDebugSession() {
assertProposedApi(extension);
return extHostDebugService.activeDebugSession;
},
createDebugSession(config: vscode.DebugConfiguration) {
return extHostDebugService.createDebugSession(config);
},
onDidTerminateDebugSession(listener, thisArg?, disposables?) {
return extHostDebugService.onDidTerminateDebugSession(listener, thisArg, disposables);
}
},
onDidChangeActiveDebugSession: proposedApiFunction(extension, (listener, thisArg?, disposables?) => {
return extHostDebugService.onDidChangeActiveDebugSession(listener, thisArg, disposables);
})
};