From f014d40866d1af26b2b72697c02d50ce8b29ce5d Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 11 Nov 2020 11:45:35 +0100 Subject: [PATCH] ensure debugging 2 times the same hash --- apps/remix-ide/src/app/tabs/debugger-tab.js | 3 ++- libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 5fb1754c24..22bcd856dc 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -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() } diff --git a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx index e08d1288f1..bbf18bc6bb 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -32,7 +32,7 @@ export const DebuggerUI = ({ debuggerModule }) => { if (debuggerModule.debugHash) { debug(debuggerModule.debugHash) } - }, [debuggerModule.debugHash]) + }, [debuggerModule.debugHashRequest]) useEffect(() => { if (debuggerModule.removeHighlights) deleteHighlights()