From 639aec2ddcc5b8c9654802a8cec1f29dba360002 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 10 Aug 2022 12:24:06 +0200 Subject: [PATCH] grid view for the debugger --- .../remix-app/components/dragbar/dragbar.tsx | 2 +- .../debugger-ui/src/lib/debugger-ui.tsx | 48 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx index 952ea8ee48..942e293012 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx @@ -20,7 +20,7 @@ const DragBar = (props: IRemixDragBarUi) => { useEffect(() => { setDragBarPosX(offset + (props.hidden ? 0 : props.refObject.current.offsetWidth)) - }, [props.hidden, offset]) + }, [props.hidden, offset, props.resizeTo]) useEffect(() => { initialWidth.current = props.refObject.current.clientWidth 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 3120979c2b..18b92a4dad 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -282,36 +282,36 @@ export const DebuggerUI = (props: DebuggerUIProps) => { }) setTimeout(async() => { - try { debuggerModule.onStartDebugging() - await debuggerInstance.debug(blockNumber, txNumber, tx, () => { - listenToEvents(debuggerInstance, currentReceipt) + try { + await debuggerInstance.debug(blockNumber, txNumber, tx, () => { + listenToEvents(debuggerInstance, currentReceipt) + setState(prevState => { + return { + ...prevState, + blockNumber, + txNumber, + debugging: true, + currentReceipt, + currentBlock, + currentTransaction, + debugger: debuggerInstance, + toastMessage: `debugging ${txNumber}`, + validationError: '' + } + }) + }) + } catch (error) { + unLoad() setState(prevState => { return { ...prevState, - blockNumber, - txNumber, - debugging: true, - currentReceipt, - currentBlock, - currentTransaction, - debugger: debuggerInstance, - toastMessage: `debugging ${txNumber}`, - validationError: '' + validationError: error.message || error } }) - }) - } catch (error) { - unLoad() - setState(prevState => { - return { - ...prevState, - validationError: error.message || error - } - }) - } - }, 300) - handleResize() + } + }, 300) + handleResize() } const debug = (txHash, web3?) => {