Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

truffle test --debug hangs without starting the debugger #6163

@aardvarkk

Description

@aardvarkk

Issue

When I try to use in-test debugging, it hangs my terminal. Ganache seems to show the contract getting deployed successfully, and the output from the truffle test command shows the contract getting successfully compiled.


> Artifacts written to /var/folders/4x/gnfwkbhn3dv7277cbcd0wjr80000gn/T/test--3627-470AjUBtVWpk
> Compiled successfully using:
   - solc: 0.8.21+commit.d9974bed.Emscripten.clang

However, then it just says "Contract: MyContract" and stalls. I can see pairs of calls to eth_getBlockByNumber being called about once per second in the ganache output. My contract

Steps to Reproduce

  • Create a brand new project created with the latest version of Truffle
  • Create a contract function (mine is a tokenURI function of the following form: function tokenURI(address creator, uint256 tokenId) external view returns (string memory);)
  • Add a test to call the tokenURI function in the contract, and wrap it in debug()

Expected Behavior

The debugger should start in the terminal when running truffle test --debug

Actual Results

The terminal hangs, showing only "Contract: MyContract".

Environment

  • Operating System: macOS (M2 Max)
  • Ethereum client: Ganache
  • Truffle version (truffle version): 5.11.2
  • node version (node --version): 18.17.2
  • npm version (npm --version): 8.19.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions