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

# Debug Recipes

> Step-by-step guide to debugging and troubleshooting recipes

## How to Debug Recipe Execution

<Steps>
  <Step title="Enable Verbose Mode">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe run my-recipe --verbose
    ```
  </Step>

  <Step title="Check Recipe Validation">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe validate ./my-recipe
    ```
  </Step>

  <Step title="View Recipe Info">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe info my-recipe
    ```
  </Step>

  <Step title="Check Tool Resolution">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai tools list
    ```
  </Step>
</Steps>

## How to Use Recipe Doctor

<Steps>
  <Step title="Run Doctor Command">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai tools doctor
    ```
  </Step>

  <Step title="Review Diagnostics">
    The doctor command will show:

    * Missing tools
    * Invalid tool references
    * Configuration issues
    * Dependency problems
  </Step>

  <Step title="Fix Issues">
    Based on doctor output, fix the identified issues in your recipe files.
  </Step>
</Steps>

## How to Debug Tool Resolution

<Steps>
  <Step title="List Available Tools">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai tools list
    ```
  </Step>

  <Step title="Resolve Specific Tool">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai tools resolve shell_tool
    ```
  </Step>
</Steps>

## How to Debug with Python

<Steps>
  <Step title="Enable Debug Logging">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    import logging
    logging.basicConfig(level=logging.DEBUG)

    from praisonaiagents import Agent

    agent = Agent(
        name="test",
        role="Test Agent",
        verbose=True
    )
    ```
  </Step>

  <Step title="Test Agent Execution">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    result = agent.start("Test task")
    print(result)
    ```
  </Step>
</Steps>

## Common Issues and Solutions

| Issue              | Cause              | Solution                     |
| ------------------ | ------------------ | ---------------------------- |
| Tool not found     | Tool not available | Check `praisonai tools list` |
| Variable undefined | Missing variable   | Pass with `--var key=value`  |
| Recipe not found   | Wrong path         | Use full path                |
| Permission denied  | File access        | Check file permissions       |

## Debug CLI Options

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run <recipe> [DEBUG OPTIONS]

Debug Options:
  --verbose              Enable verbose logging
```
