diff --git a/docs/how-to-debug-a-contract.md b/docs/how-to-debug-a-contract.md index 517ec06ab..200610130 100644 --- a/docs/how-to-debug-a-contract.md +++ b/docs/how-to-debug-a-contract.md @@ -72,4 +72,11 @@ If you want to debug a unit test written with the [Mocha](https://mochajs.org) t :::note You need to change the contract test file name in [launch.json](https://github.com/sCrypt-Inc/boilerplate/blob/master/.vscode/launch.json#L25) if needed. -::: \ No newline at end of file +::: + +### Debug a ScriptContext Failure +One common failure is caused by ScriptContext assertions, like +```typescript +assert(this.ctx.hashOutputs == hash256(outputs), 'hashOutputs mismatch') +``` +Refer to [this guide](advanced/how-to-debug-scriptcontext.md) to debug such failures.