diff --git a/src/app/debugger/debugger/debugger.js b/src/app/debugger/debugger/debugger.js index 8478191e5c..b3f8e40eeb 100644 --- a/src/app/debugger/debugger/debugger.js +++ b/src/app/debugger/debugger/debugger.js @@ -81,6 +81,14 @@ Debugger.prototype.debug = function (parent) { parent.event.register('indexChanged', this, (index) => { self.step_manager.event.trigger('indexChanged', [index]) }) + + this.debugger.codeManager.event.register('changed', this, (code, address, instIndex) => { + self.debugger.callTree.sourceLocationTracker.getSourceLocationFromVMTraceIndex(address, this.step_manager.currentStepIndex, this.debugger.solidityProxy.contracts, (error, sourceLocation) => { + if (!error) { + parent.event.trigger('sourceLocationChanged', [sourceLocation]) + } + }) + }) } module.exports = Debugger diff --git a/src/app/debugger/debuggerUI.js b/src/app/debugger/debuggerUI.js index 3940b83adb..63892aa302 100644 --- a/src/app/debugger/debuggerUI.js +++ b/src/app/debugger/debuggerUI.js @@ -173,14 +173,6 @@ class DebuggerUI { self.stepChanged(stepIndex) }) - this.debugger.codeManager.event.register('changed', this, (code, address, instIndex) => { - self.debugger.callTree.sourceLocationTracker.getSourceLocationFromVMTraceIndex(address, this.currentStepIndex, this.debugger.solidityProxy.contracts, (error, sourceLocation) => { - if (!error) { - self.event.trigger('sourceLocationChanged', [sourceLocation]) - } - }) - }) - this.vmDebuggerLogic = new VmDebuggerLogic(this, this.transactionDebugger.debugger.traceManager, this.transactionDebugger.debugger.codeManager, this.transactionDebugger.debugger.solidityProxy, this.transactionDebugger.debugger.callTree) this.vmDebugger = new VmDebugger(this.vmDebuggerLogic) this.andAddVmDebugger()