pull/2781/head
yann300 3 years ago committed by Aniket
parent 10449eeb3f
commit 1cf484afcc
  1. 1
      apps/remix-ide-e2e/src/commands/goToVMTraceStep.ts
  2. 11
      libs/remix-debug/src/debugger/stepManager.ts

@ -11,6 +11,7 @@ class GoToVmTraceStep extends EventEmitter {
function goToVMtraceStep (browser: NightwatchBrowser, step: number, incr: number, done: VoidFunction) {
browser.execute(function (step) { (document.getElementById('slider') as HTMLInputElement).value = (step - 1).toString() }, [step])
.waitForElementVisible('*[data-id="slider"]')
.setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW))
.execute((step) => {
(document.querySelector('*[data-id="slider"]') as any).internal_onmouseup({ target: { value: step }})

@ -15,7 +15,7 @@ export class DebuggerStepManager {
this.event = new EventManager()
this.debugger = _debugger
this.traceManager = traceManager
this.currentStepIndex = 0
this.currentStepIndex = -1
this.traceLength = 0
this.codeTraceLength = 0
this.revertionPoint = null
@ -34,13 +34,18 @@ export class DebuggerStepManager {
this.traceLength = newLength
this.codeTraceLength = this.calculateCodeLength()
}
this.jumpTo(0)
setTimeout(() => {
this.jumpTo(0) // wait for the ui to render
}, 500)
})
})
this.debugger.callTree.event.register('callTreeReady', () => {
if (this.debugger.callTree.functionCallStack.length) {
this.jumpTo(this.debugger.callTree.functionCallStack[0])
setTimeout(() => {
this.jumpTo(this.debugger.callTree.functionCallStack[0]) // wait for the ui to be render
}, 500)
}
})

Loading…
Cancel
Save