laravel-systematic-debugging

Diagnose Laravel application issues through a four-phase root cause investigation process.

1|Updated Jan 10, 2024
One-click install
npx skills add https://github.com/noemdb/cfla --skill laravel-systematic-debugging-noemdb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: laravel-systematic-debugging
Source: https://github.com/noemdb/cfla/tree/main/.claude/skills/laravel-systematic-debugging
Command: npx skills add https://github.com/noemdb/cfla --skill laravel-systematic-debugging-noemdb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Laravel developers often waste time applying random quick fixes that mask underlying issues and create new bugs. This Skill enforces a disciplined debugging methodology that requires root cause investigation before any fix is attempted. ## Core Features & Use Cases - Four-Phase Debugging Process: Enforces root cause investigation, pattern analysis, hypothesis testing, and verified implementation in strict order. - Laravel-Specific Techniques: Covers Telescope, Tinker, query logging, route debugging, queue inspection, and validation error tracing. - Common Scenario Playbooks: Provides step-by-step guidance for N+1 query problems, route model binding failures, and mass assignment exceptions. - Use Case: When a Pest test fails or an Eloquent relationship returns unexpected data, follow the phases to check logs, compare against Laravel conventions, form a single hypothesis in Tinker, and verify the fix with a failing-then-passing test. ## Quick Start Debug my failing Laravel test using the systematic four-phase process starting with root cause investigation.

Frequently Asked Questions about laravel-systematic-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a failing Laravel test systematically?▼

Start with root cause investigation: read the full error message, check storage/logs/laravel.log, and reproduce the issue in Tinker. Then form a single hypothesis, create a failing test case, apply one fix, and verify the test passes.

How to find N+1 query problems in Laravel Eloquent?▼

Enable Model::preventLazyLoading() in non-production environments to throw exceptions on lazy loading. Then identify the offending relationship and add eager loading with with('relation') to the query, verifying the query count drops.

What tools help debug Laravel applications?▼

Laravel Telescope provides visibility into requests, queries, jobs, events, and exceptions. Tinker lets you test hypotheses interactively, and DB::enableQueryLog() or DB::listen reveals the actual SQL and bindings being executed.

Why does Laravel throw a mass assignment exception?▼

Laravel blocks attributes not listed in the model's $fillable array to prevent mass assignment vulnerabilities. Add the missing field to $fillable, then verify with a test that the record saves with the expected attribute values.

When should I stop trying fixes and rethink the approach?▼

Stop after three failed fix attempts. Repeated failures where each fix reveals new coupling or creates new symptoms indicate an architectural problem, so question whether the Laravel pattern itself is correct before continuing.