@@ -175,22 +175,23 @@ function debugModule(module, runtime) {
175 var pauseDelay = Date.now() - pauseTime;
175 var pauseDelay = Date.now() - pauseTime;
176 runtime.timer.addDelay(pauseDelay);
176 runtime.timer.addDelay(pauseDelay);
177 programPaused = false;
177 programPaused = false;
179− // If we're not unpausing at the head, then we need to dump the
180− // events that are ahead of where we're continuing.
181− var lastSnapshotPosition = Math.floor(position / EVENTS_PER_SAVE);
182− eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
183− snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
179+ // we need to dump the events that are ahead of where we're continuing.
180+ var lastSnapshotPosition = Math.floor(position / EVENTS_PER_SAVE);
181+ eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
182+ snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
185 var lastEventTime = recordedEvents[position-1].timestep;
185 var lastEventTime = recordedEvents[position-1].timestep;
186 var scrubTime = runtime.timer.now() - lastEventTime;
186 var scrubTime = runtime.timer.now() - lastEventTime;
187 runtime.timer.addDelay(scrubTime);
187 runtime.timer.addDelay(scrubTime);
189− recordedEvents = recordedEvents.slice(0, position);
190− tracePath.clearTracesAfter(position);
191− runtime.debuggerStatus.eventCounter = position;
192− executeCallbacks(asyncCallbacks, false);
190+ recordedEvents = recordedEvents.slice(0, position);
191+ tracePath.clearTracesAfter(position);
192+ runtime.debuggerStatus.eventCounter = position;
193+ executeCallbacks(asyncCallbacks, false);
194 tracePath.startRecording();
195 tracePath.startRecording();