After running Hardhat tests in the console with npx hardhat test
I decided that being able to set break points would help me iterate faster.
How can I get Webstorm to run the underlying functions started by npx hardhat test
so that I can use the built in Debugger?
I've since discovered that hardhat runs mocha under the hood.
To debug in WebStorm you can:
--timeout 10000
because mocha's default timeout is only 2000ms
const {ethers} = require('hardhat');
to your test file because it is no longer injected by hardhat during run time.At this point I could successfully set break points in my test file but not in the MyContract.sol file. This is not surprising given that the contract is compiled before its run.