Commit 69bd368e authored by Iuri Matias's avatar Iuri Matias Committed by yann300

move code manager event

parent 850b5cd3
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment