mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
debug API: add onDidStartDebugSession
This commit is contained in:
@@ -18,6 +18,9 @@ export class ExtHostDebugService extends ExtHostDebugServiceShape {
|
||||
private _debugServiceProxy: MainThreadDebugServiceShape;
|
||||
private _debugSessions: Map<DebugSessionUUID, ExtHostDebugSession> = new Map<DebugSessionUUID, ExtHostDebugSession>();
|
||||
|
||||
private _onDidStartDebugSession: Emitter<vscode.DebugSession>;
|
||||
get onDidStartDebugSession(): Event<vscode.DebugSession> { return this._onDidStartDebugSession.event; }
|
||||
|
||||
private _onDidTerminateDebugSession: Emitter<vscode.DebugSession>;
|
||||
get onDidTerminateDebugSession(): Event<vscode.DebugSession> { return this._onDidTerminateDebugSession.event; }
|
||||
|
||||
@@ -34,6 +37,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceShape {
|
||||
constructor(threadService: IThreadService) {
|
||||
super();
|
||||
|
||||
this._onDidStartDebugSession = new Emitter<vscode.DebugSession>();
|
||||
this._onDidTerminateDebugSession = new Emitter<vscode.DebugSession>();
|
||||
this._onDidChangeActiveDebugSession = new Emitter<vscode.DebugSession>();
|
||||
this._onDidReceiveDebugSessionCustomEvent = new Emitter<vscode.DebugSessionCustomEvent>();
|
||||
@@ -50,6 +54,16 @@ export class ExtHostDebugService extends ExtHostDebugServiceShape {
|
||||
});
|
||||
}
|
||||
|
||||
public $acceptDebugSessionStarted(id: DebugSessionUUID, type: string, name: string): void {
|
||||
|
||||
let debugSession = this._debugSessions.get(id);
|
||||
if (!debugSession) {
|
||||
debugSession = new ExtHostDebugSession(this._debugServiceProxy, id, type, name);
|
||||
this._debugSessions.set(id, debugSession);
|
||||
}
|
||||
this._onDidStartDebugSession.fire(debugSession);
|
||||
}
|
||||
|
||||
public $acceptDebugSessionTerminated(id: DebugSessionUUID, type: string, name: string): void {
|
||||
|
||||
let debugSession = this._debugSessions.get(id);
|
||||
|
||||
Reference in New Issue
Block a user