Commit 457bad4f authored by yann300's avatar yann300

pass currentStep

parent 09a58f5c
...@@ -20,7 +20,7 @@ class breakpointManager { ...@@ -20,7 +20,7 @@ class breakpointManager {
} catch (e) { } catch (e) {
console.log('cannot jump to breakpoint ' + e.message) console.log('cannot jump to breakpoint ' + e.message)
} }
if (this.checkSourceLocation(sourceLocation)) { if (this.checkSourceLocation(sourceLocation, currentStep)) {
this.debugger.stepManager.jumpTo(currentStep) this.debugger.stepManager.jumpTo(currentStep)
this.event.trigger('breakpointHit', [sourceLocation]) this.event.trigger('breakpointHit', [sourceLocation])
break break
...@@ -29,15 +29,15 @@ class breakpointManager { ...@@ -29,15 +29,15 @@ class breakpointManager {
} }
} }
checkSourceLocation (sourceLocation) { checkSourceLocation (sourceLocation, currentStep) {
if (this.breakpoints[sourceLocation.file]) { if (this.breakpoints[sourceLocation.file]) {
var sources = this.breakpoints[sourceLocation.file] var sources = this.breakpoints[sourceLocation.file]
for (var k in sources) { for (var k in sources) {
var source = sources[k] var source = sources[k]
if (sourceLocation.start >= source.start && if (sourceLocation.start >= source.start &&
sourceLocation.start < source.end && sourceLocation.start < source.end &&
(this.breakpointHits[source.file][source.row] === this.debugger.currentStepIndex || this.breakpointHits[source.file][source.row] === -1)) { (this.breakpointHits[source.file][source.row] === currentStep || this.breakpointHits[source.file][source.row] === -1)) {
this.breakpointHits[source.file][source.row] = this.debugger.currentStepIndex this.breakpointHits[source.file][source.row] = currentStep
return true return true
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment