move step manager step changed response to debugger

pull/3094/head
Iuri Matias 6 years ago committed by yann300
parent b677b00550
commit e7aef4cd1b
  1. 7
      src/app/debugger/debugger/debugger.js
  2. 11
      src/app/debugger/debuggerUI.js

@ -90,6 +90,13 @@ Debugger.prototype.debug = function (tx, loadingCb) {
this.vmDebuggerLogic = new VmDebuggerLogic(this.debugger, tx, this.step_manager, this.debugger.traceManager, this.debugger.codeManager, this.debugger.solidityProxy, this.debugger.callTree) this.vmDebuggerLogic = new VmDebuggerLogic(this.debugger, tx, this.step_manager, this.debugger.traceManager, this.debugger.codeManager, this.debugger.solidityProxy, this.debugger.callTree)
this.step_manager.event.register('stepChanged', this, function (stepIndex) {
self.debugger.codeManager.resolveStep(stepIndex, tx)
self.step_manager.event.trigger('indexChanged', [stepIndex])
self.vmDebuggerLogic.event.trigger('indexChanged', [stepIndex])
self.registerAndHighlightCodeItem(stepIndex)
})
loadingCb() loadingCb()
this.debugger.debug(tx) this.debugger.debug(tx)
} }

@ -147,19 +147,8 @@ class DebuggerUI {
return return
} }
// TODO: move this to a param to .debug()
// still here because tx is being reffered in children
this.tx = tx
this.transactionDebugger.debug(tx, () => { this.transactionDebugger.debug(tx, () => {
self.stepManager = new StepManagerUI(this.transactionDebugger.step_manager) self.stepManager = new StepManagerUI(this.transactionDebugger.step_manager)
self.transactionDebugger.step_manager.event.register('stepChanged', this, function (stepIndex) {
self.transactionDebugger.debugger.codeManager.resolveStep(stepIndex, self.tx)
self.transactionDebugger.step_manager.event.trigger('indexChanged', [stepIndex])
self.transactionDebugger.vmDebuggerLogic.event.trigger('indexChanged', [stepIndex])
self.transactionDebugger.registerAndHighlightCodeItem(stepIndex)
})
self.vmDebugger = new VmDebugger(this.transactionDebugger.vmDebuggerLogic) self.vmDebugger = new VmDebugger(this.transactionDebugger.vmDebuggerLogic)
self.andAddVmDebugger() self.andAddVmDebugger()
}) })

Loading…
Cancel
Save