Skip to content

Commit 4fee76e

Browse files
committed
1 parent bec8956 commit 4fee76e

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/vs/workbench/contrib/debug/browser/debugSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export class DebugSession implements IDebugSession {
366366
}
367367
}
368368

369-
async dataBreakpointInfo(name: string, variablesReference?: number): Promise<{ dataId: string | null, description: string, canPersist?: boolean }> {
369+
async dataBreakpointInfo(name: string, variablesReference?: number): Promise<{ dataId: string | null, description: string, canPersist?: boolean } | undefined> {
370370
if (!this.raw) {
371371
throw new Error(localize('noDebugAdapter', "No debug adapter, can not send '{0}'", 'data breakpoints info'));
372372
}

src/vs/workbench/contrib/debug/browser/variablesView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ export class VariablesView extends ViewPane {
194194
}
195195
if (session && session.capabilities.supportsDataBreakpoints) {
196196
const response = await session.dataBreakpointInfo(variable.name, variable.parent.reference);
197-
const dataid = response.dataId;
198-
if (dataid) {
197+
const dataid = response?.dataId;
198+
if (response && dataid) {
199199
actions.push(new Separator());
200200
actions.push(new Action('debug.breakWhenValueChanges', nls.localize('breakWhenValueChanges', "Break When Value Changes"), undefined, true, () => {
201201
return this.debugService.addDataBreakpoint(response.description, dataid, !!response.canPersist, response.accessTypes);

src/vs/workbench/contrib/debug/common/debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export interface IDebugSession extends ITreeElement {
214214

215215
sendBreakpoints(modelUri: uri, bpts: IBreakpoint[], sourceModified: boolean): Promise<void>;
216216
sendFunctionBreakpoints(fbps: IFunctionBreakpoint[]): Promise<void>;
217-
dataBreakpointInfo(name: string, variablesReference?: number): Promise<{ dataId: string | null, description: string, canPersist?: boolean, accessTypes?: DebugProtocol.DataBreakpointAccessType[] }>;
217+
dataBreakpointInfo(name: string, variablesReference?: number): Promise<{ dataId: string | null, description: string, canPersist?: boolean, accessTypes?: DebugProtocol.DataBreakpointAccessType[] } | undefined>;
218218
sendDataBreakpoints(dbps: IDataBreakpoint[]): Promise<void>;
219219
sendExceptionBreakpoints(exbpts: IExceptionBreakpoint[]): Promise<void>;
220220
breakpointsLocations(uri: uri, lineNumber: number): Promise<IPosition[]>;

src/vs/workbench/contrib/debug/test/common/mockDebug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class MockSession implements IDebugSession {
144144
throw new Error('Method not implemented.');
145145
}
146146

147-
dataBreakpointInfo(name: string, variablesReference?: number | undefined): Promise<{ dataId: string | null; description: string; canPersist?: boolean | undefined; }> {
147+
dataBreakpointInfo(name: string, variablesReference?: number | undefined): Promise<{ dataId: string | null; description: string; canPersist?: boolean | undefined; } | undefined> {
148148
throw new Error('Method not implemented.');
149149
}
150150

0 commit comments

Comments
 (0)