@@ -178,7 +178,7 @@ function debugModule(module, runtime) {
180function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
180function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
181− var eventCounter = 0;
181+ var currentEventIndex = 0;
183 function resetProgram() {
183 function resetProgram() {
184 debugModule.clearAsyncCallbacks();
184 debugModule.clearAsyncCallbacks();
@@ -197,23 +197,23 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
198 function pauseProgram() {
198 function pauseProgram() {
199 debugModule.setPaused();
199 debugModule.setPaused();
200− eventCounter = debugModule.getRecordedEventsLength();
200+ currentEventIndex = debugModule.getRecordedEventsLength();
203 function continueProgram() {
203 function continueProgram() {
204 if (debugModule.getPaused())
204 if (debugModule.getPaused())
206− if(eventCounter === 0) {
206+ if(currentEventIndex === 0) {
207 restartProgram();
207 restartProgram();
210 resetProgram();
210 resetProgram();
211− var continueIndex = eventCounter;
211+ var continueIndex = currentEventIndex;
212− eventCounter = 0;
212+ currentEventIndex = 0;
213 debugModule.tracePath.clearTraces();
213 debugModule.tracePath.clearTraces();
214 debugModule.tracePath.startRecording();
214 debugModule.tracePath.startRecording();
215 stepTo(continueIndex);
215 stepTo(continueIndex);
216− debugModule.setContinue(eventCounter);
216+ debugModule.setContinue(currentEventIndex);
@@ -227,19 +227,19 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
227 throw "Index out of bounds: " + index;
227 throw "Index out of bounds: " + index;
230− if (index < eventCounter) {
230+ if (index < currentEventIndex) {
231 resetProgram();
231 resetProgram();
232− eventCounter = 0;
232+ currentEventIndex = 0;
235− assert(index >= eventCounter, "index must be bad");
235+ assert(index >= currentEventIndex, "index must be bad");
236− while (eventCounter < index) {
236+ while (currentEventIndex < index) {
237− var nextEvent = debugModule.getRecordedEventAt(eventCounter);
237+ var nextEvent = debugModule.getRecordedEventAt(currentEventIndex);
238 runtime.notify(nextEvent.id, nextEvent.value, nextEvent.timestep);
238 runtime.notify(nextEvent.id, nextEvent.value, nextEvent.timestep);
240− eventCounter += 1;
240+ currentEventIndex += 1;
242− assert(eventCounter == index, "while loop didn't work");
242+ assert(currentEventIndex == index, "while loop didn't work");
245 function getMaxSteps() {
245 function getMaxSteps() {
@@ -265,13 +265,13 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
267 function getHotSwapState() {
267 function getHotSwapState() {
268− var continueIndex = eventCounter;
268+ var continueIndex = currentEventIndex;
269 if (!debugModule.getPaused()) {
269 if (!debugModule.getPaused()) {
270 continueIndex = getMaxSteps();
270 continueIndex = getMaxSteps();
273 recordedEvents: debugModule.copyRecordedEvents(),
273 recordedEvents: debugModule.copyRecordedEvents(),
274− eventCounter: continueIndex
274+ currentEventIndex: continueIndex
@@ -296,11 +296,11 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
296 stepTo(getMaxSteps());
296 stepTo(getMaxSteps());
297 debugModule.tracePath.stopRecording();
297 debugModule.tracePath.stopRecording();
299− stepTo(hotSwapState.eventCounter);
299+ stepTo(hotSwapState.currentEventIndex);
300 if (paused) {
300 if (paused) {
301 debugModule.setPaused();
301 debugModule.setPaused();
303− debugModule.setContinue(hotSwapState.eventCounter);
303+ debugModule.setContinue(hotSwapState.currentEventIndex);
@@ -317,7 +317,7 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
317 dispose: dispose,
317 dispose: dispose,
318 allNodes: debugModule.signalGraphNodes,
318 allNodes: debugModule.signalGraphNodes,
319 watchTracker: debugModule.watchTracker,
319 watchTracker: debugModule.watchTracker,
320− mainSignalNode: debugModule.debuggedModule.main
320+ signalGraphMain: debugModule.debuggedModule.main
323 return elmDebugger;
323 return elmDebugger;
@@ -336,10 +336,10 @@ function Point(x, y) {
339−function tracePathInit(runtime, mainSignalNode) {
339+function tracePathInit(runtime, signalGraphMain) {
340 var List = Elm.List.make(runtime);
340 var List = Elm.List.make(runtime);
341 var Signal = Elm.Signal.make(runtime);
341 var Signal = Elm.Signal.make(runtime);
342− var tracePathNode = A2(Signal.lift, graphicsUpdate, mainSignalNode);
342+ var tracePathNode = A2(Signal.lift, graphicsUpdate, signalGraphMain);
343 var tracePathCanvas = createCanvas();
343 var tracePathCanvas = createCanvas();
344 var tracePositions = {};
344 var tracePositions = {};
345 var recordingTraces = true;
345 var recordingTraces = true;