mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 09:38:38 +01:00
debug: introduce data breakpoints
This commit is contained in:
@@ -715,8 +715,8 @@ export interface MainThreadDebugServiceShape extends IDisposable {
|
||||
$customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): Promise<any>;
|
||||
$appendDebugConsole(value: string): void;
|
||||
$startBreakpointEvents(): void;
|
||||
$registerBreakpoints(breakpoints: Array<ISourceMultiBreakpointDto | IFunctionBreakpointDto>): Promise<void>;
|
||||
$unregisterBreakpoints(breakpointIds: string[], functionBreakpointIds: string[]): Promise<void>;
|
||||
$registerBreakpoints(breakpoints: Array<ISourceMultiBreakpointDto | IFunctionBreakpointDto | IDataBreakpointDto>): Promise<void>;
|
||||
$unregisterBreakpoints(breakpointIds: string[], functionBreakpointIds: string[], dataBreakpointIds: string[]): Promise<void>;
|
||||
}
|
||||
|
||||
export interface IOpenUriOptions {
|
||||
@@ -1198,6 +1198,13 @@ export interface IFunctionBreakpointDto extends IBreakpointDto {
|
||||
functionName: string;
|
||||
}
|
||||
|
||||
export interface IDataBreakpointDto extends IBreakpointDto {
|
||||
type: 'data';
|
||||
dataId: string;
|
||||
canPersist: boolean;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface ISourceBreakpointDto extends IBreakpointDto {
|
||||
type: 'source';
|
||||
uri: UriComponents;
|
||||
@@ -1206,9 +1213,9 @@ export interface ISourceBreakpointDto extends IBreakpointDto {
|
||||
}
|
||||
|
||||
export interface IBreakpointsDeltaDto {
|
||||
added?: Array<ISourceBreakpointDto | IFunctionBreakpointDto>;
|
||||
added?: Array<ISourceBreakpointDto | IFunctionBreakpointDto | IDataBreakpointDto>;
|
||||
removed?: string[];
|
||||
changed?: Array<ISourceBreakpointDto | IFunctionBreakpointDto>;
|
||||
changed?: Array<ISourceBreakpointDto | IFunctionBreakpointDto | IDataBreakpointDto>;
|
||||
}
|
||||
|
||||
export interface ISourceMultiBreakpointDto {
|
||||
|
||||
@@ -2166,6 +2166,24 @@ export class FunctionBreakpoint extends Breakpoint {
|
||||
}
|
||||
}
|
||||
|
||||
@es5ClassCompat
|
||||
export class DataBreakpoint extends Breakpoint {
|
||||
readonly label: string;
|
||||
readonly dataId: string;
|
||||
readonly canPersist: boolean;
|
||||
|
||||
constructor(label: string, dataId: string, canPersist: boolean, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string) {
|
||||
super(enabled, condition, hitCondition, logMessage);
|
||||
if (!dataId) {
|
||||
throw illegalArgument('dataId');
|
||||
}
|
||||
this.label = label;
|
||||
this.dataId = dataId;
|
||||
this.canPersist = canPersist;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@es5ClassCompat
|
||||
export class DebugAdapterExecutable implements vscode.DebugAdapterExecutable {
|
||||
readonly command: string;
|
||||
|
||||
Reference in New Issue
Block a user