Commit cbfcccf0 authored by Iuri Matias's avatar Iuri Matias

fix breakpoint event; add method to trigger souce update

parent c5fb4817
...@@ -8,6 +8,7 @@ class CmdLine { ...@@ -8,6 +8,7 @@ class CmdLine {
constructor () { constructor () {
this.events = new EventManager() this.events = new EventManager()
this.lineColumnPos = null this.lineColumnPos = null
this.rawLocation = null
} }
connect (providerType, url) { connect (providerType, url) {
...@@ -87,6 +88,7 @@ class CmdLine { ...@@ -87,6 +88,7 @@ class CmdLine {
self.debugger.event.register('newSourceLocation', function (lineColumnPos, rawLocation) { self.debugger.event.register('newSourceLocation', function (lineColumnPos, rawLocation) {
self.lineColumnPos = lineColumnPos self.lineColumnPos = lineColumnPos
self.rawLocation = rawLocation
self.events.emit("source", [lineColumnPos, rawLocation]) self.events.emit("source", [lineColumnPos, rawLocation])
}); });
...@@ -102,16 +104,23 @@ class CmdLine { ...@@ -102,16 +104,23 @@ class CmdLine {
self.events.emit("locals", data) 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() { stepJumpNextBreakpoint() {
this.debugger.step_manager.stepJumpNextBreakpoint() this.debugger.step_manager.jumpNextBreakpoint()
} }
stepJumpPreviousBreakpoint() { stepJumpPreviousBreakpoint() {
this.debugger.step_manager.stepJumpPreviousBreakpoint() this.debugger.step_manager.jumpPreviousBreakpoint()
} }
stepOverForward(solidityMode) { stepOverForward(solidityMode) {
......
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