|
|
|
@ -82,6 +82,8 @@ function Debugger (container, sourceHighlighter, localRegistry) { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// ====================
|
|
|
|
|
// listen to events
|
|
|
|
|
this.debugger.event.register('newTraceLoaded', this, function () { |
|
|
|
|
self.event.trigger('debuggerStatus', [true]) |
|
|
|
|
}) |
|
|
|
@ -90,6 +92,13 @@ function Debugger (container, sourceHighlighter, localRegistry) { |
|
|
|
|
self._components.sourceHighlighter.currentSourceLocation(null) |
|
|
|
|
self.event.trigger('debuggerStatus', [false]) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// ====================
|
|
|
|
|
// add providers
|
|
|
|
|
this.debugger.addProvider('vm', executionContext.vm()) |
|
|
|
|
this.debugger.addProvider('injected', executionContext.internalWeb3()) |
|
|
|
|
this.debugger.addProvider('web3', executionContext.internalWeb3()) |
|
|
|
|
this.debugger.switchProvider(executionContext.getProvider()) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -107,24 +116,24 @@ Debugger.prototype.debug = function (txHash) { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* add a new web3 provider to remix |
|
|
|
|
* |
|
|
|
|
* @param {String} type - type/name of the provider to add |
|
|
|
|
* @param {Object} obj - provider |
|
|
|
|
*/ |
|
|
|
|
Debugger.prototype.addProvider = function (type, obj) { |
|
|
|
|
this.debugger.addProvider(type, obj) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* switch the provider |
|
|
|
|
* |
|
|
|
|
* @param {String} type - type/name of the provider to use |
|
|
|
|
*/ |
|
|
|
|
Debugger.prototype.switchProvider = function (type) { |
|
|
|
|
this.debugger.switchProvider(type) |
|
|
|
|
} |
|
|
|
|
// /**
|
|
|
|
|
// * add a new web3 provider to remix
|
|
|
|
|
// *
|
|
|
|
|
// * @param {String} type - type/name of the provider to add
|
|
|
|
|
// * @param {Object} obj - provider
|
|
|
|
|
// */
|
|
|
|
|
// Debugger.prototype.addProvider = function (type, obj) {
|
|
|
|
|
// this.debugger.addProvider(type, obj)
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
// * switch the provider
|
|
|
|
|
// *
|
|
|
|
|
// * @param {String} type - type/name of the provider to use
|
|
|
|
|
// */
|
|
|
|
|
// Debugger.prototype.switchProvider = function (type) {
|
|
|
|
|
// this.debugger.switchProvider(type)
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* get the current provider |
|
|
|
|