提交 889fe706 编写于 作者: I isidor

debug: announce breakpoint set / removed

fixes #6491
上级 ed70be21
......@@ -429,15 +429,17 @@ export class DebugService implements debug.IDebugService {
public addBreakpoints(rawBreakpoints: debug.IRawBreakpoint[]): TPromise<void[]> {
this.model.addBreakpoints(rawBreakpoints);
const uris = arrays.distinct(rawBreakpoints, raw => raw.uri.toString()).map(raw => raw.uri);
rawBreakpoints.forEach(rbp => aria.status(nls.localize('breakpointAdded', "Added breakpoint, line {0}, file {1}", rbp.lineNumber, rbp.uri.fsPath)));
return TPromise.join(uris.map(uri => this.sendBreakpoints(uri)));
}
public removeBreakpoints(id?: string): TPromise<any> {
const toRemove = this.model.getBreakpoints().filter(bp => !id || bp.getId() === id);
toRemove.forEach(bp => aria.status(nls.localize('breakpointRemoved', "Removed breakpoint, line {0}, file {1}", bp.lineNumber, bp.source.uri.fsPath)));
const urisToClear = arrays.distinct(toRemove, bp => bp.source.uri.toString()).map(bp => bp.source.uri);
this.model.removeBreakpoints(toRemove);
this.model.removeBreakpoints(toRemove);
return TPromise.join(urisToClear.map(uri => this.sendBreakpoints(uri)));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册