@@ -32,6 +32,7 @@ function debugModule(module, runtime) {
3232 var programPaused = false;
3333 var recordedEvents = [];
3434 var asyncCallbacks = [];
35+ var watchTracker = Elm.Native.Debug.make(runtime).watchTracker;
3536
3637 function wrapNotify(id, v) {
3738 var timestep = Date.now();
@@ -63,6 +64,7 @@ function debugModule(module, runtime) {
6364 }
6465
6566 function recordEvent(id, v, timestep) {
67+ watchTracker.pushFrame();
6668 recordedEvents.push({ id:id, value:v, timestep:timestep });
6769 }
6870
@@ -143,7 +145,8 @@ function debugModule(module, runtime) {
143145 loadRecordedEvents: loadRecordedEvents,
144146 getPaused: getPaused,
145147 setPaused: setPaused,
146− tracePath: tracePath
148+ tracePath: tracePath,
149+ watchTracker: watchTracker,
147150 };
148151}
149152
@@ -158,6 +161,7 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
158161
159162 function restartProgram() {
160163 resetProgram();
164+ debugModule.watchTracker.clear();
161165 debugModule.tracePath.clearTraces();
162166 debugModule.clearRecordedEvents();
163167 debugModule.setPaused(false);
@@ -262,6 +266,7 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
262266 getHotSwapState: getHotSwapState,
263267 dispose: dispose,
264268 allNodes: debugModule.moduleNodes,
269+ watchTracker: debugModule.watchTracker,
265270 mainNode: debugModule.moduleInstance.main
266271 };
267272