Skip to content

Commit

Permalink
ensure debugging 2 times the same hash
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Nov 11, 2020
1 parent f4f0ba2 commit 2c6c481
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/remix-ide/src/app/tabs/debugger-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class DebuggerTab extends ViewPlugin {
this.blockchain = blockchain
this.debugHash = null
this.removeHighlights = false
this.debugHashRequest = 0
}

render () {
Expand Down Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const DebuggerUI = ({ debuggerModule }) => {
if (debuggerModule.debugHash) {
debug(debuggerModule.debugHash)
}
}, [debuggerModule.debugHash])
}, [debuggerModule.debugHashRequest])

useEffect(() => {
if (debuggerModule.removeHighlights) deleteHighlights()
Expand Down

0 comments on commit 2c6c481

Please sign in to comment.