@@ -87,7 +87,8 @@ function debugModule(module, runtime) {
87 tracePath.stopRecording();
87 tracePath.stopRecording();
90+ // executeCallbacks should only be called when continuing, not when restarting.
90− executeCallbacks(asyncCallbacks);
91+ //executeCallbacks(asyncCallbacks, false);
91 tracePath.startRecording();
92 tracePath.startRecording();
@@ -142,8 +143,10 @@ function debuggerInit(debugModule, runtime) {
143 function restartProgram() {
144 function restartProgram() {
144 resetProgram();
145 resetProgram();
146+ debugModule.tracePath.clearTraces();
145 debugModule.clearRecordedEvents();
147 debugModule.clearRecordedEvents();
148+ debugModule.setPaused(false);
146− executeCallbacks(debugModule.initialAsyncCallbacks);
149+ executeCallbacks(debugModule.initialAsyncCallbacks, true);
149 function pauseProgram() {
152 function pauseProgram() {
@@ -328,9 +331,9 @@ function tracePathInit(runtime) {
331−function executeCallbacks(callbacks) {
334+function executeCallbacks(callbacks, reexecute) {
332 callbacks.forEach(function(timer) {
335 callbacks.forEach(function(timer) {
333− if (!timer.executed) {
336+ if (reexecute || !timer.executed) {
334 var func = timer.func;
337 var func = timer.func;