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.

⭐200stars🔀107forks📁View on GitHub🕐Updated Jan 1, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill provides comprehensive troubleshooting and debugging guidance specifically for the Wheels (CFWheels) framework. It helps developers quickly identify root causes for common framework errors—such as argument mismatches, association failures, and database migration issues—while offering actionable code solutions and best practices to streamline the development lifecycle.

Use Cases

  • Resolving Framework Exceptions: Quickly diagnosing and fixing common CFWheels errors like 'Missing argument name' or 'Association not found' with validated code examples.
  • Database & Migration Troubleshooting: Debugging 'Table not found' or 'Column not found' errors by verifying migration status and database schema consistency.
  • Data Type & Logic Correction: Identifying and correcting type casting issues, such as invalid attempts to cast Query objects to Arrays, and ensuring proper use of framework-specific methods.
  • Environment & Variable Inspection: Utilizing built-in debugging tools to enable debug outputs, inspect complex objects with cfabort/cfdump, and monitor SQL query execution.
nameWheels Debugging
descriptionTroubleshoot 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.

Wheels Debugging

Common Errors

"Missing argument name" Error

Cause: Mixed positional and named arguments

Solution: Use consistent argument style

❌ 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

❌ 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:

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

// In config/settings.cfm
set(showDebugInformation=true);
set(showErrorInformation=true);

Inspect Variables

<cfdump var="#post#" label="Post Object">
<cfabort>

Check SQL Queries

// Wheels logs all SQL to debugging output
// Look for red SQL queries (errors)

Generated by: Wheels Debugging Skill v1.0