debug: reveal debugService.sendAllBreakpoints

fixes #57214
This commit is contained in:
isidor 2018-08-27 13:04:42 +02:00
parent 169fdac3b9
commit 2920b3f56e
4 changed files with 12 additions and 2 deletions

View file

@ -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.
*/

View file

@ -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

View file

@ -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);
}));

View file

@ -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);
}