fix start debugging

pull/1/head
yann300 6 years ago
parent 1a8aa4c352
commit d5750afeef
  1. 6
      src/app.js
  2. 5
      src/app/execution/txLogger.js
  3. 3
      src/app/tabs/tabbed-menu.js

@ -259,11 +259,6 @@ class App {
// self._adjustLayout('right', self.data._layout.right.offset) // self._adjustLayout('right', self.data._layout.right.offset)
return self._view.el return self._view.el
} }
startdebugging (txHash) {
const self = this
self.event.trigger('debuggingRequested', [])
self._components.righthandpanel.debugger().debug(txHash)
}
loadFromGist (params) { loadFromGist (params) {
const self = this const self = this
return self._components.gistHandler.handleLoad(params, function (gistId) { return self._components.gistHandler.handleLoad(params, function (gistId) {
@ -542,6 +537,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
} }
var txLogger = new TxLogger() // eslint-disable-line var txLogger = new TxLogger() // eslint-disable-line
txLogger.event.register('debuggingRequested', (hash) => { debug.debugger().debug(hash) })
var queryParams = new QueryParams() var queryParams = new QueryParams()

@ -142,8 +142,7 @@ class TxLogger {
editorPanel: this._components.registry.get('editorpanel').api, editorPanel: this._components.registry.get('editorpanel').api,
txListener: this._components.registry.get('txlistener').api, txListener: this._components.registry.get('txlistener').api,
eventsDecoder: this._components.registry.get('eventsdecoder').api, eventsDecoder: this._components.registry.get('eventsdecoder').api,
compilersArtefacts: this._components.registry.get('compilersartefacts').api, compilersArtefacts: this._components.registry.get('compilersartefacts').api
app: this._components.registry.get('app').api
} }
this.logKnownTX = this._deps.editorPanel.registerCommand('knownTransaction', (args, cmds, append) => { this.logKnownTX = this._deps.editorPanel.registerCommand('knownTransaction', (args, cmds, append) => {
@ -208,7 +207,7 @@ function debug (e, data, self) {
if (data.tx.isCall && data.tx.envMode !== 'vm') { if (data.tx.isCall && data.tx.envMode !== 'vm') {
modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.') modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.')
} else { } else {
self._deps.app.startdebugging(data.tx.hash) self.event.trigger('debuggingRequested', [data.tx.hash])
} }
} }

@ -17,9 +17,6 @@ module.exports = class TabbedMenu {
app: self._components.registry.get('app').api app: self._components.registry.get('app').api
} }
self._view = { el: null, viewport: null, tabs: {}, contents: {} } self._view = { el: null, viewport: null, tabs: {}, contents: {} }
self._deps.app.event.register('debuggingRequested', () => {
self.selectTabByTitle('Debugger')
})
} }
render () { render () {
const self = this const self = this

Loading…
Cancel
Save