move code manager event

pull/3094/head
Iuri Matias 6 years ago committed by yann300
parent 20951e53c5
commit 7aa09de9db
  1. 8
      src/app/debugger/debugger/debugger.js
  2. 8
      src/app/debugger/debuggerUI.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

@ -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()

Loading…
Cancel
Save