# Debugging Failed dbt™ Commands with Terminal Context

Quickly diagnose and resolve dbt™ execution errors by providing terminal output directly to DinoAI for analysis.

When dbt™ commands fail, error messages can be cryptic and troubleshooting often requires switching between terminal output, documentation, and forums. DinoAI can analyze your terminal output directly and provide specific guidance to resolve issues quickly.

{% hint style="info" %}
**Requirement**: Highlight the error message in your terminal and select "Add to Chat" to provide the terminal output as context before sending your prompt.
{% endhint %}

***

### Step-by-Step Instructions

1. **Run your dbt™ command** and encounter the error
2. **Highlight the error message** and relevant terminal output in your terminal
3. **Right-click and select "Add to Chat"** to send the terminal content to DinoAI
4. **Open DinoAI** by clicking the DinoAI icon (🪄) in the right panel
5. **Add additional info** to help DinoAI troubleshoot
6. **Review DinoAI's diagnosis** and follow the recommended steps
7. **Implement the suggested fixes** and test your dbt™ run again

{% @arcade/embed flowId="U88eY4IFk593nJIsSvf5" url="<https://app.arcade.software/share/U88eY4IFk593nJIsSvf5>" %}

***

### How It Works

After you add terminal context and enter your prompt:

1. DinoAI analyzes the error message and terminal output for specific error patterns
2. It identifies the root cause (missing files, configuration issues, SQL errors, etc.)
3. It cross-references the error with common dbt™ troubleshooting solutions
4. It provides step-by-step instructions to resolve the specific issue
5. If configured, DinoAI suggests relevant .dinorules updates to prevent similar issues

***

{% hint style="success" %}

#### Key Benefits

* **Immediate Diagnosis**: Get specific error analysis without searching documentation
* **Contextual Solutions**: Receive fixes tailored to your exact error message and setup
* **Faster Resolution**: Resolve issues in minutes rather than hours of troubleshooting
* **No Context Switching**: Debug directly within your development environment
  {% endhint %}
