我在我的“硬帽子项目”中开发了一个任务,但是当我试图传递一个数组参数(@ethersproject/string/src.ts/utf8.ts中的某个内容表示Cannot read properties of undefined (reading 'length'))时,我遇到了一些错误。
所以我试着用VS代码调试这个任务,但是到目前为止我还没有成功。使用以下launch.json我得到了错误:HardhatError: HH5: HardhatContext is not created.
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Task: registerIssuer",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/packages/ntt/",
"runtimeArgs": ["-r", "ts-node/register"],
"args": ["${workspaceRoot}/packages/ntt/tasks/registerIssuer.ts"]
},
]
}发布于 2022-10-12 15:04:33
您可以尝试硬帽子的详细日志记录模式。此模式将打印一系列可用于调试的输出:
请参阅:https://hardhat.org/hardhat-runner/docs/troubleshooting/verbose-logging
https://ethereum.stackexchange.com/questions/137351
复制相似问题