Diagnose errors and failing tests in Laravel + React + Python applications. Use when encountering bugs, exceptions, stack traces, 500 errors, TypeErrors, failing tests, or unexpected behavior...
Exclusive to: debugger agent
mcp_gemini-bridge_consult_gemini(query="Root cause analysis: [error message]. Stack trace: [trace]", directory=".")
mcp_open-bridge_consult_gemini(query="Root cause analysis: [error message]. Stack trace: [trace]", directory=".")
Lookup error patterns and fixes in official docs:
mcp_context7_resolve-library-id(libraryName="[library]", query="[error type]")
mcp_context7_query-docs(libraryId="/[resolved-id]", query="[specific error message]")
Before completing any fix, run this verification sequence:
composer test # All PHP tests pass
npm run types # No TypeScript errors
npm run lint # No linting errors
If any command fails, investigate and fix before reporting completion.
storage/logs/laravel.logForm 1-3 ranked hypotheses based on:
# Search for error patterns
grep -r "error text" --include="*.php" --include="*.tsx" app/ resources/
# Check recent changes
git log --oneline -10
git diff HEAD~3
# Run isolated test
php artisan test --filter=TestName
| Error | Likely Cause | Solution |
|---|---|---|
ModelNotFoundException |
Wrong ID, missing record | Check route model binding |
ValidationException |
Invalid input | Review FormRequest rules |
AuthorizationException |
Policy failure | Check policy methods |
QueryException |
SQL error | Check migration/schema |
TokenMismatchException |
CSRF issue | Add @csrf directive |
Class not found |
Autoload issue | Run composer dump-autoload |
| Error | Likely Cause | Solution |
|---|---|---|
Cannot read property of undefined |
Null access | Add optional chaining ?. |
Type 'X' is not assignable |
Type mismatch | Fix interface/props |
Hook call violation |
Hook in wrong place | Move to component |
Hydration mismatch |
SSR/client diff | Use useEffect |
# Laravel
php artisan tinker # Interactive REPL
tail -f storage/logs/laravel.log # Watch logs
php artisan route:list # Check routes
php artisan migrate:status # Check migrations
# Frontend
npm run types # TypeScript errors
npm run lint # ESLint issues
## ๐ Bug
[One sentence description]
## ๐ Root Cause
[What was wrong and why]
## ๐ง Fix
| File | Change |
|------|--------|
| `path/file` | Description |
## ๐งช Regression Test
[Test name and coverage]
## โ
Verification
$ [command]
[output]