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

# Debugging

Use this guide to troubleshoot common local and cloud execution issues.

## Start with Validation

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm validate .
```

Fix manifest and entry point issues before debugging runtime behavior.

## Run with Debug Logs

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm run . --input "Hello" --debug
```

## Common Issues

### 1. Import or Entry Point Error

Check `runtime.adapter.entry_point` and make sure the module/object exists.

### 2. Missing Environment Variable

Declare required keys in `charm.yaml` and provide local values in `.env`.

### 3. Timeout

Reduce long-running work or move persistent behavior to daemon lifecycle.

### 4. Out of Memory

Avoid loading large local models or large datasets into memory.

### 5. Works Locally but Fails in Cloud

Run Docker sandbox mode:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm run . --input "Hello" --docker
```

Then check cloud logs:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
charm logs --path .
```

## Getting Help

If you are blocked, open an issue or ask in Discord with validation output, logs, and reproduction steps.
