提交 2920b3f5 编写于 作者: I isidor

debug: reveal debugService.sendAllBreakpoints

fixes #57214
上级 169fdac3
......@@ -669,6 +669,12 @@ export interface IDebugService {
*/
removeFunctionBreakpoints(id?: string): TPromise<void>;
/**
* Sends all breakpoints to the passed session.
* If session is not passed, sends all breakpoints to each session.
*/
sendAllBreakpoints(session?: ISession): TPromise<any>;
/**
* Adds a new expression to the repl.
*/
......
......@@ -992,7 +992,7 @@ export class DebugService implements IDebugService {
return this.configurationManager;
}
private sendAllBreakpoints(session?: ISession): TPromise<any> {
sendAllBreakpoints(session?: ISession): TPromise<any> {
return TPromise.join(distinct(this.model.getBreakpoints(), bp => bp.uri.toString()).map(bp => this.sendBreakpoints(bp.uri, false, session)))
.then(() => this.sendFunctionBreakpoints(session))
// send exception breakpoints at the end since some debug adapters rely on the order
......
......@@ -268,7 +268,7 @@ export class Session implements ISession {
};
// Send all breakpoints
this.debugService.setBreakpointsActivated(true).then(sendConfigurationDone, sendConfigurationDone)
this.debugService.sendAllBreakpoints(this).then(sendConfigurationDone, sendConfigurationDone)
.done(() => this.fetchThreads(), errors.onUnexpectedError);
}));
......
......@@ -39,6 +39,10 @@ export class MockDebugService implements IDebugService {
public focusStackFrame(focusedStackFrame: IStackFrame): void {
}
sendAllBreakpoints(session?: ISession): TPromise<any> {
return TPromise.as(null);
}
public addBreakpoints(uri: uri, rawBreakpoints: IBreakpointData[]): TPromise<IBreakpoint[]> {
return TPromise.as(null);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册