ensure debugging 2 times the same hash

pull/5370/head
yann300 4 years ago
parent 09f23d2523
commit f014d40866
  1. 3
      apps/remix-ide/src/app/tabs/debugger-tab.js
  2. 2
      libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx

@ -31,6 +31,7 @@ class DebuggerTab extends ViewPlugin {
this.blockchain = blockchain
this.debugHash = null
this.removeHighlights = false
this.debugHashRequest = 0
}
render () {
@ -82,8 +83,8 @@ class DebuggerTab extends ViewPlugin {
}
debug (hash) {
this.debugHash = '' // so we can trigger a debug using the same hash 2 times in a row. that's needs to be improved
this.debugHash = hash
this.debugHashRequest++// so we can trigger a debug using the same hash 2 times in a row. that's needs to be improved
this.renderComponent()
}

@ -32,7 +32,7 @@ export const DebuggerUI = ({ debuggerModule }) => {
if (debuggerModule.debugHash) {
debug(debuggerModule.debugHash)
}
}, [debuggerModule.debugHash])
}, [debuggerModule.debugHashRequest])
useEffect(() => {
if (debuggerModule.removeHighlights) deleteHighlights()

Loading…
Cancel
Save