|
|
@ -36,7 +36,7 @@ function Debugger (id, sourceHighlighter, localRegistry) { |
|
|
|
this.isActive = false |
|
|
|
this.isActive = false |
|
|
|
|
|
|
|
|
|
|
|
this.breakPointManager = new remixCore.code.BreakpointManager(this.debugger, (sourceLocation) => { |
|
|
|
this.breakPointManager = new remixCore.code.BreakpointManager(this.debugger, (sourceLocation) => { |
|
|
|
return self._deps.offsetToLineColumnConverter.offsetToLineColumn(sourceLocation, sourceLocation.file, this._deps.compiler.lastCompilationResult.data) |
|
|
|
return self._deps.offsetToLineColumnConverter.offsetToLineColumn(sourceLocation, sourceLocation.file, this._deps.compiler.lastCompilationResult.source.sources) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.debugger.setBreakpointManager(this.breakPointManager) |
|
|
|
this.debugger.setBreakpointManager(this.breakPointManager) |
|
|
@ -74,8 +74,8 @@ function Debugger (id, sourceHighlighter, localRegistry) { |
|
|
|
this.debugger.codeManager.event.register('changed', this, function (code, address, index) { |
|
|
|
this.debugger.codeManager.event.register('changed', this, function (code, address, index) { |
|
|
|
if (self._deps.compiler.lastCompilationResult) { |
|
|
|
if (self._deps.compiler.lastCompilationResult) { |
|
|
|
self.debugger.callTree.sourceLocationTracker.getSourceLocationFromInstructionIndex(address, index, self._deps.compiler.lastCompilationResult.data.contracts, function (error, rawLocation) { |
|
|
|
self.debugger.callTree.sourceLocationTracker.getSourceLocationFromInstructionIndex(address, index, self._deps.compiler.lastCompilationResult.data.contracts, function (error, rawLocation) { |
|
|
|
if (!error) { |
|
|
|
if (!error && self._deps.compiler.lastCompilationResult && self._deps.compiler.lastCompilationResult.data) { |
|
|
|
var lineColumnPos = self._deps.offsetToLineColumnConverter.offsetToLineColumn(rawLocation, rawLocation.file, self._deps.compiler.lastCompilationResult) |
|
|
|
var lineColumnPos = self._deps.offsetToLineColumnConverter.offsetToLineColumn(rawLocation, rawLocation.file, self._deps.compiler.lastCompilationResult.source.sources) |
|
|
|
self._components.sourceHighlighter.currentSourceLocation(lineColumnPos, rawLocation) |
|
|
|
self._components.sourceHighlighter.currentSourceLocation(lineColumnPos, rawLocation) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
self._components.sourceHighlighter.currentSourceLocation(null) |
|
|
|
self._components.sourceHighlighter.currentSourceLocation(null) |
|
|
|