mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-27 10:48:28 +01:00
improve breakpoint model api
This commit is contained in:
@@ -855,6 +855,19 @@ export class Model implements IModel {
|
||||
return this.breakpoints;
|
||||
}
|
||||
|
||||
public getBreakpointsForResource(resource: uri): IBreakpoint[] {
|
||||
const uriString = resource.toString();
|
||||
return this.breakpoints.filter(bp => bp.uri.toString() === uriString);
|
||||
}
|
||||
|
||||
public getActivatedBreakpointsForResource(resource: uri): IBreakpoint[] {
|
||||
if (this.breakpointsActivated) {
|
||||
const uriString = resource.toString();
|
||||
return this.breakpoints.filter(bp => bp.uri.toString() === uriString);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
public getFunctionBreakpoints(): IFunctionBreakpoint[] {
|
||||
return this.functionBreakpoints;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user