use the cache for the calltree

pull/3205/head
yann300 2 years ago committed by Aniket
parent cd756fb0a2
commit 5acf4105d7
  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