Commit 69ac0c80 authored by yann300's avatar yann300

jumpTo

parent 49b1a3f8
...@@ -80,7 +80,7 @@ class BreakpointManager { ...@@ -80,7 +80,7 @@ class BreakpointManager {
if (this.previousLine !== lineColumn.start.line) { if (this.previousLine !== lineColumn.start.line) {
if (direction === -1 && lineHadBreakpoint) { // TODO : improve this when we will build the correct structure before hand if (direction === -1 && lineHadBreakpoint) { // TODO : improve this when we will build the correct structure before hand
if (hitLine(currentStep + 1, previousSourceLocation, this)) { if (hitLine(currentStep + 1, previousSourceLocation, this)) {
break return
} else { } else {
lineHadBreakpoint = false lineHadBreakpoint = false
} }
...@@ -90,7 +90,7 @@ class BreakpointManager { ...@@ -90,7 +90,7 @@ class BreakpointManager {
lineHadBreakpoint = true lineHadBreakpoint = true
if (direction === 1) { if (direction === 1) {
if (hitLine(currentStep, sourceLocation, this)) { if (hitLine(currentStep, sourceLocation, this)) {
break return
} else { } else {
lineHadBreakpoint = false lineHadBreakpoint = false
} }
...@@ -98,9 +98,12 @@ class BreakpointManager { ...@@ -98,9 +98,12 @@ class BreakpointManager {
} }
} }
currentStep += direction currentStep += direction
if (defaultToLimit && (currentStep === this.debugger.traceManager.trace.length - 1 || currentStep === 0)) { }
this.debugger.stepManager.jumpTo(currentStep) if (defaultToLimit) {
break if (direction === -1) {
this.debugger.stepManager.jumpTo(0)
} else if (direction === 1) {
this.debugger.stepManager.jumpTo(this.debugger.traceManager.trace.length - 1)
} }
} }
} }
......
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