> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herodotus.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging

> Common troubleshooting steps for HDP pipelines and Cairo modules

## Increase logs

* Use `--log-level <trace|debug|info|warn|error>`
* Use `--debug`
* Or set `RUST_LOG=debug`

## Check environment early

```bash theme={null}
hdp env-info
hdp env-check --inputs dry_run_output.json
```

For environment variable definitions, see [Configuration reference](/data-processor/reference-configuration).

## Inspect stage artifacts

* `dry_run_output.json` should contain key sets
* `proofs.json` should contain chain/state/unconstrained proof data
* `--print_output` helps verify computed outputs during dry/sound run

See artifact flow in [Pipeline stages](/data-processor/pipeline).

If outputs look inconsistent, rerun the pipeline in order and keep module + inputs unchanged across stages.

## Cairo module debugging with `println!`

In development, you can allow debug prints by setting:

```toml theme={null}
[[target.starknet-contract]]
allowed-libfuncs-deny = true
```

## Sound run is offline

`sound-run` does not call RPCs.\
If data seems missing, the usual cause is mismatched or incomplete `proofs.json`.

## Injected state checks

* Verify `INJECTED_STATE_BASE_URL`
* Confirm [state server](/data-processor/state-server) is running
* Ensure `--injected_state` points to the intended JSON

## Proof-mode outputs

* `--proof_mode`
* `--cairo_pie <path>`
* `--stwo_prover_input <path>`
