|
|
|
@ -17,14 +17,7 @@ function Debugger (id, appAPI, executionContextEvent, editorEvent) { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.debugger.setBreakpointManager(this.breakPointManager) |
|
|
|
|
this.breakPointManager.event.register('breakpointHit', (sourceLocation) => { |
|
|
|
|
var lineColumnPos = this.offsetToLineColumnConverter.offsetToLineColumn(sourceLocation, sourceLocation.file, this.editor, this.compiler.lastCompilationResult.data) |
|
|
|
|
this.editor.setBreakpoint(lineColumnPos.start.line, 'breakpointTouched') |
|
|
|
|
var self = this |
|
|
|
|
setTimeout(function () { |
|
|
|
|
self.editor.setBreakpoint(lineColumnPos.start.line, 'breakpointUntouched') |
|
|
|
|
}, 5000) |
|
|
|
|
}) |
|
|
|
|
this.breakPointManager.event.register('breakpointHit', (sourceLocation) => {}) |
|
|
|
|
|
|
|
|
|
function convertSourceLocation (self, fileName, row) { |
|
|
|
|
var source = {} |
|
|
|
@ -39,11 +32,15 @@ function Debugger (id, appAPI, executionContextEvent, editorEvent) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
editorEvent.register('breakpointCleared', (fileName, row) => { |
|
|
|
|
this.breakPointManager.remove(convertSourceLocation(this, fileName, row)) |
|
|
|
|
if (self.compiler.lastCompilationResult.data) { |
|
|
|
|
this.breakPointManager.remove(convertSourceLocation(this, fileName, row)) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
editorEvent.register('breakpointAdded', (fileName, row) => { |
|
|
|
|
this.breakPointManager.add(convertSourceLocation(this, fileName, row)) |
|
|
|
|
if (self.compiler.lastCompilationResult.data) { |
|
|
|
|
this.breakPointManager.add(convertSourceLocation(this, fileName, row)) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
var self = this |
|
|
|
|