|
|
@ -37,7 +37,6 @@ class DebuggerUI { |
|
|
|
compiler: this.registry.get('compiler').api |
|
|
|
compiler: this.registry.get('compiler').api |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.debugger = this.transactionDebugger.debugger |
|
|
|
|
|
|
|
this.isActive = false |
|
|
|
this.isActive = false |
|
|
|
|
|
|
|
|
|
|
|
this.sourceHighlighter = new SourceHighlighter() |
|
|
|
this.sourceHighlighter = new SourceHighlighter() |
|
|
@ -69,7 +68,7 @@ class DebuggerUI { |
|
|
|
|
|
|
|
|
|
|
|
// unload if a file has changed (but not if tabs were switched)
|
|
|
|
// unload if a file has changed (but not if tabs were switched)
|
|
|
|
self.editor.event.register('contentChanged', function () { |
|
|
|
self.editor.event.register('contentChanged', function () { |
|
|
|
self.debugger.unLoad() |
|
|
|
self.transactionDebugger.unload() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -83,6 +82,8 @@ class DebuggerUI { |
|
|
|
this.transactionDebugger.event.register('newSourceLocation', function (lineColumnPos, rawLocation) { |
|
|
|
this.transactionDebugger.event.register('newSourceLocation', function (lineColumnPos, rawLocation) { |
|
|
|
self.sourceHighlighter.currentSourceLocation(lineColumnPos, rawLocation) |
|
|
|
self.sourceHighlighter.currentSourceLocation(lineColumnPos, rawLocation) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.transactionDebugger.event.register('debuggerUnloaded', self.unLoad.bind(this)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
startTxBrowser () { |
|
|
|
startTxBrowser () { |
|
|
@ -91,14 +92,12 @@ class DebuggerUI { |
|
|
|
this.txBrowser = txBrowser |
|
|
|
this.txBrowser = txBrowser |
|
|
|
|
|
|
|
|
|
|
|
txBrowser.event.register('requestDebug', function (blockNumber, txNumber, tx) { |
|
|
|
txBrowser.event.register('requestDebug', function (blockNumber, txNumber, tx) { |
|
|
|
self.debugger.unLoad() |
|
|
|
self.transactionDebugger.unload() |
|
|
|
self.unLoad() |
|
|
|
|
|
|
|
self.startDebugging(blockNumber, txNumber, tx) |
|
|
|
self.startDebugging(blockNumber, txNumber, tx) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
txBrowser.event.register('unloadRequested', this, function (blockNumber, txIndex, tx) { |
|
|
|
txBrowser.event.register('unloadRequested', this, function (blockNumber, txIndex, tx) { |
|
|
|
self.debugger.unLoad() |
|
|
|
self.transactionDebugger.unload() |
|
|
|
self.unLoad() |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|