From 457bad4fa21a606644ae6ae588f9c465f722c926 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 2 Feb 2017 18:09:49 +0100 Subject: [PATCH] pass currentStep --- src/code/breakpointManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/code/breakpointManager.js b/src/code/breakpointManager.js index 7752c9b09a..da315a4464 100644 --- a/src/code/breakpointManager.js +++ b/src/code/breakpointManager.js @@ -20,7 +20,7 @@ class breakpointManager { } catch (e) { console.log('cannot jump to breakpoint ' + e.message) } - if (this.checkSourceLocation(sourceLocation)) { + if (this.checkSourceLocation(sourceLocation, currentStep)) { this.debugger.stepManager.jumpTo(currentStep) this.event.trigger('breakpointHit', [sourceLocation]) break @@ -29,15 +29,15 @@ class breakpointManager { } } - checkSourceLocation (sourceLocation) { + checkSourceLocation (sourceLocation, currentStep) { if (this.breakpoints[sourceLocation.file]) { var sources = this.breakpoints[sourceLocation.file] for (var k in sources) { var source = sources[k] if (sourceLocation.start >= source.start && 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] = this.debugger.currentStepIndex + (this.breakpointHits[source.file][source.row] === currentStep || this.breakpointHits[source.file][source.row] === -1)) { + this.breakpointHits[source.file][source.row] = currentStep return true } }