use the cache for the calltree

pull/5370/head
yann300 2 years ago committed by Aniket
parent d553f3acd7
commit 02d542f6b4
  1. 6
      libs/remix-debug/src/code/breakpointManager.ts

@ -89,6 +89,7 @@ export class BreakpointManager {
async jump (fromStep, direction, defaultToLimit, trace) {
this.event.trigger('locatingBreakpoint', [])
let sourceLocation
let lineColumn
let previousSourceLocation
let currentStep = fromStep + direction
let lineHadBreakpoint = false
@ -96,13 +97,14 @@ export class BreakpointManager {
while (currentStep > 0 && currentStep < trace.length) {
try {
previousSourceLocation = sourceLocation
sourceLocation = await this.callTree.extractValidSourceLocation(currentStep)
const stepInfo = await this.callTree.locationAndOpcodePerVMTraceIndex[currentStep]
sourceLocation = stepInfo.sourceLocation
lineColumn = stepInfo.lineColumnPos
} catch (e) {
console.log('cannot jump to breakpoint ' + e)
currentStep += direction
continue
}
const lineColumn = await this.locationToRowConverter(sourceLocation)
if (!initialLine) initialLine = lineColumn
if (initialLine.start.line !== lineColumn.start.line) {

Loading…
Cancel
Save