debug: introduce IBaseBreakpoint

This commit is contained in:
isidor 2018-03-15 17:27:31 +01:00
parent 0b71894240
commit 6c8b65d1e8
3 changed files with 9 additions and 7 deletions

View file

@ -238,24 +238,26 @@ export interface IBreakpointUpdateData extends DebugProtocol.Breakpoint {
hitCondition?: string; hitCondition?: string;
} }
export interface IBreakpoint extends IEnablement { export interface IBaseBreakpoint extends IEnablement {
condition: string;
hitCondition: string;
}
export interface IBreakpoint extends IBaseBreakpoint {
uri: uri; uri: uri;
lineNumber: number; lineNumber: number;
endLineNumber?: number; endLineNumber?: number;
column: number; column: number;
endColumn?: number; endColumn?: number;
condition: string;
hitCondition: string;
verified: boolean; verified: boolean;
idFromAdapter: number; idFromAdapter: number;
message: string; message: string;
} }
export interface IFunctionBreakpoint extends IEnablement { export interface IFunctionBreakpoint extends IBaseBreakpoint {
name: string; name: string;
verified: boolean; verified: boolean;
idFromAdapter: number; idFromAdapter: number;
hitCondition: string;
} }
export interface IExceptionBreakpoint extends IEnablement { export interface IExceptionBreakpoint extends IEnablement {

View file

@ -697,7 +697,7 @@ export class FunctionBreakpoint implements IFunctionBreakpoint {
public verified: boolean; public verified: boolean;
public idFromAdapter: number; public idFromAdapter: number;
constructor(public name: string, public enabled: boolean, public hitCondition: string, private id = generateUuid()) { constructor(public name: string, public enabled: boolean, public hitCondition: string, public condition: string, private id = generateUuid()) {
this.verified = false; this.verified = false;
} }

View file

@ -472,7 +472,7 @@ export class DebugService implements debug.IDebugService {
let result: FunctionBreakpoint[]; let result: FunctionBreakpoint[];
try { try {
result = JSON.parse(this.storageService.get(DEBUG_FUNCTION_BREAKPOINTS_KEY, StorageScope.WORKSPACE, '[]')).map((fb: any) => { result = JSON.parse(this.storageService.get(DEBUG_FUNCTION_BREAKPOINTS_KEY, StorageScope.WORKSPACE, '[]')).map((fb: any) => {
return new FunctionBreakpoint(fb.name, fb.enabled, fb.hitCondition); return new FunctionBreakpoint(fb.name, fb.enabled, fb.hitCondition, fb.condition);
}); });
} catch (e) { } } catch (e) { }