Merge pull request #80122 from dgozman/fix-79583

Make DebugSession.name writable; fixes #79583
This commit is contained in:
Isidor Nikolic
2019-09-05 11:30:30 +02:00
committed by GitHub
10 changed files with 82 additions and 17 deletions

View File

@@ -687,6 +687,13 @@ export class ExtHostDebugService implements IExtHostDebugService, ExtHostDebugSe
this._onDidChangeActiveDebugSession.fire(this._activeDebugSession);
}
public async $acceptDebugSessionNameChanged(sessionDto: IDebugSessionDto, name: string): Promise<void> {
const session = await this.getSession(sessionDto);
if (session) {
session._acceptNameChanged(name);
}
}
public async $acceptDebugSessionCustomEvent(sessionDto: IDebugSessionDto, event: any): Promise<void> {
const session = await this.getSession(sessionDto);
const ee: vscode.DebugSessionCustomEvent = {
@@ -917,6 +924,15 @@ export class ExtHostDebugSession implements vscode.DebugSession {
return this._name;
}
public set name(name: string) {
this._name = name;
this._debugServiceProxy.$setDebugSessionName(this._id, name);
}
_acceptNameChanged(name: string) {
this._name = name;
}
public get workspaceFolder(): vscode.WorkspaceFolder | undefined {
return this._workspaceFolder;
}