Commit 766c097f authored by yann300's avatar yann300

jump to the end if no breakpoint

parent 55490eae
...@@ -26,7 +26,7 @@ class breakpointManager { ...@@ -26,7 +26,7 @@ class breakpointManager {
* start looking for the next breakpoint * start looking for the next breakpoint
* *
*/ */
async play () { async play (defaultToEnd) {
this.isPlaying = true this.isPlaying = true
var sourceLocation var sourceLocation
for (var currentStep = this.debugger.currentStepIndex + 1; currentStep < this.debugger.traceManager.trace.length; currentStep++) { for (var currentStep = this.debugger.currentStepIndex + 1; currentStep < this.debugger.traceManager.trace.length; currentStep++) {
...@@ -38,6 +38,9 @@ class breakpointManager { ...@@ -38,6 +38,9 @@ class breakpointManager {
if (this.locationToRowConverter) { if (this.locationToRowConverter) {
var lineColumn = this.locationToRowConverter(sourceLocation) var lineColumn = this.locationToRowConverter(sourceLocation)
if (this.currentLine === lineColumn.start.line) { if (this.currentLine === lineColumn.start.line) {
if (defaultToEnd && currentStep === this.debugger.traceManager.trace.length - 1) {
this.debugger.stepManager.jumpTo(currentStep) // jump to the end
}
continue continue
} }
this.currentLine = lineColumn.start.line this.currentLine = lineColumn.start.line
......
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