Closed MetaMmodern closed 7 months ago
Thanks for the report, just released a patch, please use hardhat-tracer@2.8.2
.
To run hardhat node with trace printing enabled:
npx hardhat node --traceerror
and
npx hardhat test --network localhost
otherwise you could also do this:
npx hardhat test --traceerror
@zemse nice, thanks. It works. One thing I noticed:
in your documentation you mention only the latter command, "npx hardhat test --traceError", which I mistakenly assumed is related to the test command. But from your comment I now understand that tracing is related to the running node and not to the test. I was expecting logs to appear in test console, instead I accidentally saw them in network console. (I'm running node and tests separately as you've written in first codeblock). Maybe it's worth noting somewhere.
I'll close the issue since the core issue is resolved now. Thanks for the library, it helped me identify a bug reason in my project.
If you do "npx hardhat test --trace", that should print the traces in the console while tests are running. However it is required that the network should be hardhat (it is by default). This is what I do.
If you use localhost network then traces cannot be printed in the tests console, but they could be printed in the node terminal if tracing was enabled there. This feature honestly I never use. It seems this feature is causing a confusion, I'll update the docs.
I followed the instructions, imported hardhat-tracer into config file, ran loca node like this:
and then ran test like this
And it gave the error from title.
Here's my package.json
here's my hardhat.config.ts
Note: I also tried
--vv
flag and it gave no results, no error Tx tracing.