Commit 8b8943fc authored by Iuri Matias's avatar Iuri Matias

remove unneeded console logs; prevent crash when step is out of bounds

parent c4267d43
......@@ -42,10 +42,6 @@ class CmdLine {
getSource() {
const self = this
console.dir("getSource")
console.dir(this.lineColumnPos)
console.dir(this.filename)
let lineColumnPos = this.lineColumnPos
if (!lineColumnPos || !lineColumnPos.start) return;
......@@ -111,10 +107,6 @@ class CmdLine {
displayGlobals () {
console.dir("= displayGlobals")
console.dir(this.solidityState)
if (this.solidityState && this.solidityState.voters) {
console.dir(this.solidityState.voters)
console.dir(this.solidityState.voters.value)
}
}
}
......
......@@ -115,6 +115,10 @@ Debugger.prototype.debugTx = function (tx, loadingCb) {
this.vmDebuggerLogic.start()
this.step_manager.event.register('stepChanged', this, function (stepIndex) {
if (!stepIndex) {
return self.event.trigger("endDebug")
}
self.debugger.codeManager.resolveStep(stepIndex, tx)
self.step_manager.event.trigger('indexChanged', [stepIndex])
self.vmDebuggerLogic.event.trigger('indexChanged', [stepIndex])
......
......@@ -40,7 +40,7 @@ class DebuggerSolidityLocals {
self.stepManager.currentStepIndex,
(error, result) => {
if (error) {
return console.log(error)
return error;
}
var stack = result[0].value
var memory = result[1].value
......
......@@ -53,11 +53,7 @@ class DebuggerSolidityState {
decode (index) {
const self = this
console.dir("currentStepIndex")
console.dir(self.stepManager.currentStepIndex)
self.traceManager.getCurrentCalledAddressAt(self.stepManager.currentStepIndex, function (error, address) {
console.dir(error)
console.dir(address)
if (error) {
return self.event.trigger('solidityState', [{}])
}
......
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