Skip to content

Commit

Permalink
Link ScriptContext debug in how-to-debug-a-contract.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xhliu authored Sep 2, 2024
1 parent 41b1646 commit 0a5f9cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/how-to-debug-a-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
:::
:::

### 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.

0 comments on commit 0a5f9cb

Please sign in to comment.