diff --git a/package.json b/package.json index fee3876908..046f6e82cb 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,7 @@ "make-mock-compiler": "node ci/makeMockCompiler.js", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "nightwatch_local": "nightwatch --config nightwatch.js --env local", + "nightwatch_local_debugger": "nightwatch --config nightwatch_debugger.js --env local", "nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome", "nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default", "nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie", diff --git a/src/app/debugger/remix-debugger/index.html b/src/app/debugger/remix-debugger/index.html index 662ca02fb9..bcf170aa24 100644 --- a/src/app/debugger/remix-debugger/index.html +++ b/src/app/debugger/remix-debugger/index.html @@ -9,8 +9,6 @@ var container = document.getElementById('app') var debuggerBackend = new window.remix.ui.DebuggerBackend({}) container.debugger = new window.remix.ui.Debugger({debugger: debuggerBackend}) - debuggerBackend.addProvider('INTERNAL') - debuggerBackend.switchProvider('INTERNAL') container.appendChild(container.debugger.render()) } diff --git a/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js b/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js index 99b7d19d6f..778370a2a2 100644 --- a/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js +++ b/src/app/debugger/remix-debugger/src/ui/EthdebuggerUI.js @@ -63,9 +63,9 @@ EthdebuggerUI.prototype.get_web3 = function () { return this.web3 } -EthdebuggerUI.prototype.updateWeb3Reference = function () { +EthdebuggerUI.prototype.updateWeb3Reference = function (web3) { if (!this.txBrowser) return - this.txBrowser.web3 = executionContext.web3() + this.txBrowser.web3 = web3 || executionContext.web3() } EthdebuggerUI.prototype.setCompilationResult = function (compilationResult) { diff --git a/src/app/debugger/remix-debugger/test-browser-debugger/resources/insertTestWeb3.js b/src/app/debugger/remix-debugger/test-browser-debugger/resources/insertTestWeb3.js index d12a6aa22c..e82b1c9388 100644 --- a/src/app/debugger/remix-debugger/test-browser-debugger/resources/insertTestWeb3.js +++ b/src/app/debugger/remix-debugger/test-browser-debugger/resources/insertTestWeb3.js @@ -58,6 +58,7 @@ function loadTestWeb3 (data) { uiTestweb3.currentProvider = {host: 'web3 modified for testing purposes :)'} vmdebugger.addProvider('TEST', uiTestweb3) vmdebugger.switchProvider('TEST') + container.debugger.updateWeb3Reference(uiTestweb3) } function waitForRemix (data) {