debugger fix

pull/3199/head
filip mertens 2 years ago committed by Aniket
parent a79ce971a3
commit d868b3c3db
  1. 4
      apps/debugger/src/app/debugger-api.ts
  2. 4
      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) {}
onStartDebugging () {
onStartDebugging (debuggerBackend: any) {
this.call('layout', 'maximiseSidePanel')
this.emit('startDebugging')
this.debuggerBackend = debuggerBackend
}
onStopDebugging () {
this.call('layout', 'resetSidePanel')
this.emit('stopDebugging')
this.debuggerBackend = null
}
}

@ -4,7 +4,7 @@ import { IDebuggerApi, LineColumnLocation,
onBreakpointClearedListener, onBreakpointAddedListener, onEditorContentChanged, onEnvChangedListener, TransactionReceipt } from '@remix-ui/debugger-ui'
import { DebuggerApiMixin } from './debugger-api'
import { CompilerAbstract } from '@remix-project/remix-solidity'
export class DebuggerClientApi extends DebuggerApiMixin(PluginClient) {
constructor () {
super()
@ -25,7 +25,7 @@ export class DebuggerClientApi extends DebuggerApiMixin(PluginClient) {
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)
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
}

@ -296,7 +296,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
})
setTimeout(async() => {
debuggerModule.onStartDebugging()
debuggerModule.onStartDebugging(debuggerInstance)
try {
await debuggerInstance.debug(blockNumber, txNumber, tx, () => {
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)
web3: () => any // returns an instance of web3.js
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
}

Loading…
Cancel
Save