Home Reference Source
import Debugger from 'truffle-debugger/lib/debugger.js'
public class | source

Debugger

Example:

let session = Debugger
  .forTx(<txHash>, {
    contracts: [<contract obj>, ...],
    provider: <provider instance>
  })
  .connect();

Static Member Summary

Static Public Members
public static get

Exported selectors

Static Method Summary

Static Public Methods
public static

async forTx(txHash: String, options: {contracts: Array<Contract>, files: Array<String>, provider: Web3Provider}): Debugger

Instantiates a Debugger for a given transaction hash.

Method Summary

Public Methods
public

Connects to the instantiated Debugger.

Static Public Members

public static get selectors: * source

Exported selectors

See individual selector docs for full listing

Example:

Debugger.selectors.ast.current.tree
Debugger.selectors.solidity.current.instruction
Debugger.selectors.trace.steps

Static Public Methods

public static async forTx(txHash: String, options: {contracts: Array<Contract>, files: Array<String>, provider: Web3Provider}): Debugger source

Instantiates a Debugger for a given transaction hash.

Params:

NameTypeAttributeDescription
txHash String

transaction hash with leading "0x"

options {contracts: Array<Contract>, files: Array<String>, provider: Web3Provider}

Return:

Debugger

instance

Public Methods

public connect(): Session source

Connects to the instantiated Debugger.

Return:

Session

session instance