From cbfcccf023fc8bea4ed279e7925f47f45ea391dd Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 19 Oct 2018 18:01:01 -0400 Subject: [PATCH] fix breakpoint event; add method to trigger souce update --- remix-debug/src/cmdline/index.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/remix-debug/src/cmdline/index.js b/remix-debug/src/cmdline/index.js index fe942ca74c..51d979f7e5 100644 --- a/remix-debug/src/cmdline/index.js +++ b/remix-debug/src/cmdline/index.js @@ -8,6 +8,7 @@ class CmdLine { constructor () { this.events = new EventManager() this.lineColumnPos = null + this.rawLocation = null } connect (providerType, url) { @@ -87,6 +88,7 @@ class CmdLine { self.debugger.event.register('newSourceLocation', function (lineColumnPos, rawLocation) { self.lineColumnPos = lineColumnPos + self.rawLocation = rawLocation self.events.emit("source", [lineColumnPos, rawLocation]) }); @@ -102,16 +104,23 @@ class CmdLine { self.events.emit("locals", data) }); - cb() + if (cb) { + // TODO: this should be an onReady event + setTimeout(cb, 1000); + } }) } + triggerSourceUpdate() { + this.events.emit("source", [this.lineColumnPos, this.rawLocation]) + } + stepJumpNextBreakpoint() { - this.debugger.step_manager.stepJumpNextBreakpoint() + this.debugger.step_manager.jumpNextBreakpoint() } stepJumpPreviousBreakpoint() { - this.debugger.step_manager.stepJumpPreviousBreakpoint() + this.debugger.step_manager.jumpPreviousBreakpoint() } stepOverForward(solidityMode) {