提交 3c84fe64 编写于 作者: I isidor

debug: 'breakpoint' event

上级 399451e9
...@@ -119,7 +119,8 @@ export var SessionEvents = { ...@@ -119,7 +119,8 @@ export var SessionEvents = {
SERVER_EXIT: 'exit', SERVER_EXIT: 'exit',
CONTINUED: 'continued', CONTINUED: 'continued',
THREAD: 'thread', THREAD: 'thread',
OUTPUT: 'output' OUTPUT: 'output',
BREAKPOINT: 'breakpoint'
}; };
// model interfaces // model interfaces
......
...@@ -289,6 +289,19 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService ...@@ -289,6 +289,19 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
} }
})); }));
this.toDispose.push(this.session.addListener2(debug.SessionEvents.BREAKPOINT, (event: DebugProtocol.BreakpointEvent) => {
const id = event.body && event.body.breakpoint ? event.body.breakpoint.id : undefined;
const breakpoint = this.model.getBreakpoints().filter(bp => bp.getId() === <any>id).pop();
if (breakpoint) {
this.model.updateBreakpoints({ [breakpoint.getId()]: event.body.breakpoint });
} else {
const functionBreakpoint = this.model.getFunctionBreakpoints().filter(bp => bp.getId() === <any>id).pop();
if (functionBreakpoint) {
this.model.updateFunctionBreakpoints({ [functionBreakpoint.getId()]: event.body.breakpoint });
}
}
}));
this.toDispose.push(this.session.addListener2(debug.SessionEvents.SERVER_EXIT, event => { this.toDispose.push(this.session.addListener2(debug.SessionEvents.SERVER_EXIT, event => {
if (this.session && this.session.getId() === event.sessionId) { if (this.session && this.session.getId() === event.sessionId) {
this.onSessionEnd(); this.onSessionEnd();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册