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