debugger fix

pull/5370/head
filip mertens 2 years ago committed by Aniket
parent 4e575fa365
commit 26e4870331
  1. 4
      apps/debugger/src/app/debugger-api.ts
  2. 2
      apps/debugger/src/app/debugger.ts
  3. 2
      libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
  4. 2
      libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts

@ -172,14 +172,16 @@ export const DebuggerApiMixin = (Base) => class extends Base {
showMessage (title: string, message: string) {} showMessage (title: string, message: string) {}
onStartDebugging () { onStartDebugging (debuggerBackend: any) {
this.call('layout', 'maximiseSidePanel') this.call('layout', 'maximiseSidePanel')
this.emit('startDebugging') this.emit('startDebugging')
this.debuggerBackend = debuggerBackend
} }
onStopDebugging () { onStopDebugging () {
this.call('layout', 'resetSidePanel') this.call('layout', 'resetSidePanel')
this.emit('stopDebugging') this.emit('stopDebugging')
this.debuggerBackend = null
} }
} }

@ -25,7 +25,7 @@ export class DebuggerClientApi extends DebuggerApiMixin(PluginClient) {
setFile: (path: string, content: string) => Promise<void> setFile: (path: string, content: string) => Promise<void>
getDebugWeb3: () => any // returns an instance of web3.js, if applicable (mainet, goerli, ...) it returns a reference to a node from devops (so we are sure debug endpoint is available) getDebugWeb3: () => any // returns an instance of web3.js, if applicable (mainet, goerli, ...) it returns a reference to a node from devops (so we are sure debug endpoint is available)
web3: () => any // returns an instance of web3.js web3: () => any // returns an instance of web3.js
onStartDebugging: () => void // called when debug starts onStartDebugging: (debuggerBackend: any) => void // called when debug starts
onStopDebugging: () => void // called when debug stops onStopDebugging: () => void // called when debug stops
} }

@ -296,7 +296,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}) })
setTimeout(async() => { setTimeout(async() => {
debuggerModule.onStartDebugging() debuggerModule.onStartDebugging(debuggerInstance)
try { try {
await debuggerInstance.debug(blockNumber, txNumber, tx, () => { await debuggerInstance.debug(blockNumber, txNumber, tx, () => {
listenToEvents(debuggerInstance, currentReceipt) listenToEvents(debuggerInstance, currentReceipt)

@ -51,7 +51,7 @@ export interface IDebuggerApi {
getDebugWeb3: () => any // returns an instance of web3.js, if applicable (mainet, goerli, ...) it returns a reference to a node from devops (so we are sure debug endpoint is available) getDebugWeb3: () => any // returns an instance of web3.js, if applicable (mainet, goerli, ...) it returns a reference to a node from devops (so we are sure debug endpoint is available)
web3: () => any // returns an instance of web3.js web3: () => any // returns an instance of web3.js
showMessage (title: string, message: string): void showMessage (title: string, message: string): void
onStartDebugging (): void // called when debug starts onStartDebugging (debuggerBackend: any): void // called when debug starts
onStopDebugging (): void // called when debug stops onStopDebugging (): void // called when debug stops
} }

Loading…
Cancel
Save