NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.04k stars 1.36k forks source link

Add `debug` traces #5363

Open kanej opened 1 month ago

kanej commented 1 month ago

Support the DEBUG environment variable for tasks.

We should document guidelines on the usage of the debug library within the built-in Hardhat tasks.

We should then cover the existing tasks (i.e. help, run, console etc).

> DEBUG=* hardhat --help
  hardhat:core:vars:varsManager Creating a new instance of VarsManager +0ms
  hardhat:core:vars:varsManager Loading ENV variables if any +1ms
  hardhat:core:config Loading Hardhat config from /Users/fred/projects/nomiclabs/temp-sample/hardhat.config.js +0ms
  hardhat:core:hre Creating HardhatRuntimeEnvironment +0ms
  hardhat:core:global-dir Looking up Client Id at /Users/fred/Library/Application Support/hardhat-nodejs/analytics.json +0ms
  hardhat:core:global-dir Client Id found: 6e29ffc9-9450-4a6d-8a46-4f1cce03d837 +0ms
  hardhat:core:analytics Sending hit for task +0ms