mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
debug: function breakpoints first steps.
This commit is contained in:
parent
3ff3b840c6
commit
5c1d9f9762
|
@ -74,6 +74,10 @@ export interface IBreakpoint extends IEnablement {
|
|||
condition: string;
|
||||
}
|
||||
|
||||
export interface IFunctionBreakpoint extends IEnablement {
|
||||
functionName: string;
|
||||
}
|
||||
|
||||
export interface IExceptionBreakpoint extends IEnablement {
|
||||
name: string;
|
||||
}
|
||||
|
@ -119,6 +123,7 @@ export interface IModel extends ee.IEventEmitter, ITreeElement {
|
|||
getThreads(): { [reference: number]: IThread; };
|
||||
getBreakpoints(): IBreakpoint[];
|
||||
areBreakpointsActivated(): boolean;
|
||||
getFunctionBreakpoints(): IFunctionBreakpoint[];
|
||||
getExceptionBreakpoints(): IExceptionBreakpoint[];
|
||||
getWatchExpressions(): IExpression[];
|
||||
getReplElements(): ITreeElement[];
|
||||
|
|
|
@ -267,6 +267,19 @@ export class Breakpoint implements debug.IBreakpoint {
|
|||
}
|
||||
}
|
||||
|
||||
export class FunctionBreakpoint implements debug.IFunctionBreakpoint {
|
||||
|
||||
private id: string;
|
||||
|
||||
constructor(public functionName: string, public enabled: boolean) {
|
||||
this.id = uuid.generateUuid();
|
||||
}
|
||||
|
||||
public getId(): string {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
|
||||
export class ExceptionBreakpoint implements debug.IExceptionBreakpoint {
|
||||
|
||||
private id: string;
|
||||
|
@ -286,7 +299,7 @@ export class Model extends ee.EventEmitter implements debug.IModel {
|
|||
private toDispose: lifecycle.IDisposable[];
|
||||
private replElements: debug.ITreeElement[];
|
||||
|
||||
constructor(private breakpoints: debug.IBreakpoint[], private breakpointsActivated: boolean,
|
||||
constructor(private breakpoints: debug.IBreakpoint[], private breakpointsActivated: boolean, private functionBreakpoints: debug.IFunctionBreakpoint[],
|
||||
private exceptionBreakpoints: debug.IExceptionBreakpoint[], private watchExpressions: Expression[]) {
|
||||
|
||||
super();
|
||||
|
@ -331,6 +344,10 @@ export class Model extends ee.EventEmitter implements debug.IModel {
|
|||
return this.breakpoints;
|
||||
}
|
||||
|
||||
public getFunctionBreakpoints(): debug.IFunctionBreakpoint[] {
|
||||
return this.functionBreakpoints;
|
||||
}
|
||||
|
||||
public getExceptionBreakpoints(): debug.IExceptionBreakpoint[] {
|
||||
return this.exceptionBreakpoints;
|
||||
}
|
||||
|
@ -378,9 +395,8 @@ export class Model extends ee.EventEmitter implements debug.IModel {
|
|||
bp.lineNumber = bp.desiredLineNumber;
|
||||
}
|
||||
});
|
||||
this.exceptionBreakpoints.forEach(ebp => {
|
||||
ebp.enabled = enabled;
|
||||
});
|
||||
this.exceptionBreakpoints.forEach(ebp => ebp.enabled = enabled);
|
||||
this.functionBreakpoints.forEach(fbp => fbp.enabled = enabled);
|
||||
|
||||
this.emit(debug.ModelEvents.BREAKPOINTS_UPDATED);
|
||||
}
|
||||
|
@ -600,6 +616,7 @@ export class Model extends ee.EventEmitter implements debug.IModel {
|
|||
this.threads = null;
|
||||
this.breakpoints = null;
|
||||
this.exceptionBreakpoints = null;
|
||||
this.functionBreakpoints = null;
|
||||
this.watchExpressions = null;
|
||||
this.replElements = null;
|
||||
this.toDispose = lifecycle.disposeAll(this.toDispose);
|
||||
|
|
Loading…
Reference in a new issue