# Wheels Debugging

> Troubleshoot common Wheels errors and provide debugging guidance. Use when encountering errors, exceptions, or unexpected behavior. Provides error analysis, common solutions, and debugging strategies for Wheels applications. Use when this capability is needed.

- Skill: `tomevault-io/wheels-debugging` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/wheels-debugging`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/wheels-debugging/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/wheels-debugging

---


# Wheels Debugging

## Common Errors

### "Missing argument name" Error

**Cause:** Mixed positional and named arguments

**Solution:** Use consistent argument style
```cfm
❌ hasMany("comments", dependent="delete")
✅ hasMany(name="comments", dependent="delete")
```

### "Can't cast Object type [Query] to [Array]"

**Cause:** Using Array functions on queries

**Solution:** Use query methods
```cfm
❌ ArrayLen(post.comments())
✅ post.comments().recordCount
```

### "Association not found" Error

**Cause:** Association not properly defined or typo

**Solution:**
1. Check model config() for association definition
2. Verify association name matches
3. Check model name spelling

### "Table not found" Error

**Cause:** Migration not run or table name mismatch

**Solution:**
```bash
wheels dbmigrate latest
```

### "Column not found" Error

**Cause:** Property doesn't exist in database

**Solution:**
1. Add column via migration
2. Check property name spelling
3. Verify case sensitivity

## Debugging Tools

### Enable Debug Output
```cfm
// In config/settings.cfm
set(showDebugInformation=true);
set(showErrorInformation=true);
```

### Inspect Variables
```cfm
<cfdump var="#post#" label="Post Object">
<cfabort>
```

### Check SQL Queries
```cfm
// Wheels logs all SQL to debugging output
// Look for red SQL queries (errors)
```

---

**Generated by:** Wheels Debugging Skill v1.0

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/wheels-dev) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

