|
|
|
@ -26,6 +26,22 @@ export const DebuggerUI = ({ debuggerModule }) => { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
return unLoad() |
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
debug(debuggerModule.debugHash) |
|
|
|
|
}, [debuggerModule.debugHash]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
getTrace(debuggerModule.getTraceHash) |
|
|
|
|
}, [debuggerModule.getTraceHash]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (debuggerModule.removeHighlights) deleteHighlights() |
|
|
|
|
}, [debuggerModule.removeHighlights]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
const setEditor = () => { |
|
|
|
|
const editor = globalRegistry.get('editor').api |
|
|
|
@ -35,7 +51,11 @@ export const DebuggerUI = ({ debuggerModule }) => { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
editor.event.register('breakpointAdded', (fileName, row) => { |
|
|
|
|
if (state.debugger) state.debugger.breakPointManager.add({fileName: fileName, row: row}) |
|
|
|
|
console.log('breakpoint triggerred!') |
|
|
|
|
if (state.debugger) { |
|
|
|
|
console.log('breakpoint added!') |
|
|
|
|
state.debugger.breakPointManager.add({fileName: fileName, row: row}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
editor.event.register('contentChanged', () => { |
|
|
|
@ -44,20 +64,7 @@ export const DebuggerUI = ({ debuggerModule }) => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setEditor() |
|
|
|
|
return unLoad() |
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
debug(debuggerModule.debugHash) |
|
|
|
|
}, [debuggerModule.debugHash]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
getTrace(debuggerModule.getTraceHash) |
|
|
|
|
}, [debuggerModule.getTraceHash]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (debuggerModule.removeHighlights) deleteHighlights() |
|
|
|
|
}, [debuggerModule.removeHighlights]) |
|
|
|
|
}, [state.debugger]) |
|
|
|
|
|
|
|
|
|
const fetchContractAndCompile = (address, receipt) => { |
|
|
|
|
const target = (address && remixDebug.traceHelper.isContractCreation(address)) ? receipt.contractAddress : address |
|
|
|
|