Skip to content

Commit 645e218

Browse files
Cache the API object created (microsoft#204064)
* Cache the API object created * Update src/vs/workbench/api/common/extHostDebugService.ts Co-authored-by: Connor Peet <connor@peet.io> --------- Co-authored-by: Connor Peet <connor@peet.io>
1 parent bf16cce commit 645e218

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/api/common/extHostDebugService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
10041004
}
10051005

10061006
export class ExtHostDebugSession {
1007-
1007+
private apiSession?: vscode.DebugSession;
10081008
constructor(
10091009
private _debugServiceProxy: MainThreadDebugServiceShape,
10101010
private _id: DebugSessionUUID,
@@ -1017,7 +1017,7 @@ export class ExtHostDebugSession {
10171017

10181018
public get api(): vscode.DebugSession {
10191019
const that = this;
1020-
return Object.freeze({
1020+
return this.apiSession ??= Object.freeze({
10211021
id: that._id,
10221022
type: that._type,
10231023
get name() {

0 commit comments

Comments
 (0)