mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Make DebugSession.name writable; fixes #79583
This commit is contained in:
@@ -35,6 +35,9 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDebugService);
|
||||
this._toDispose.add(debugService.onDidNewSession(session => {
|
||||
this._proxy.$acceptDebugSessionStarted(this.getSessionDto(session));
|
||||
this._toDispose.add(session.onDidChangeName(name => {
|
||||
this._proxy.$acceptDebugSessionNameChanged(this.getSessionDto(session), name);
|
||||
}));
|
||||
}));
|
||||
// Need to start listening early to new session events because a custom event can come while a session is initialising
|
||||
this._toDispose.add(debugService.onWillNewSession(session => {
|
||||
@@ -225,6 +228,13 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
});
|
||||
}
|
||||
|
||||
public $setDebugSessionName(sessionId: DebugSessionUUID, name: string): void {
|
||||
const session = this.debugService.getModel().getSession(sessionId);
|
||||
if (session) {
|
||||
session.setName(name);
|
||||
}
|
||||
}
|
||||
|
||||
public $customDebugAdapterRequest(sessionId: DebugSessionUUID, request: string, args: any): Promise<any> {
|
||||
const session = this.debugService.getModel().getSession(sessionId, true);
|
||||
if (session) {
|
||||
|
||||
Reference in New Issue
Block a user