jump to the end if no breakpoint

pull/7/head
yann300 8 years ago
parent 55490eae82
commit 766c097fae
  1. 5
      src/code/breakpointManager.js

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

Loading…
Cancel
Save