buggregator/trap
Buggregator Trap enhances PHP debugging with instant Symfony VarDumper integrations, handy helper functions, and a lightweight local Buggregator server (no Docker). Connect to any Buggregator server and pair with the PhpStorm plugin for a smooth workflow.
Enhanced Debugging Workflow for Laravel/PHP Teams:
var_dump, dd(), or third-party SaaS solutions) with a self-hosted, Docker-free alternative that integrates seamlessly with Laravel’s ecosystem.trap() replaces dump()).Cost Optimization:
Tooling Integration:
var_dump/dd() spaghetti or manual logging.dump()/dd() with zero config.Problem:
Debugging in Laravel/PHP is fragmented, slow, and costly. Developers waste hours on var_dump hell, manual logging, or context-switching between tools (Monolog, Sentry, Postman). This delays releases and inflates cloud costs (e.g., $500+/mo for Sentry + Datadog).
Solution: Buggregator Trap is a self-hosted, Docker-free debug server that:
vendor/bin/trap).ROI:
Ask: "Should we pilot Trap for our next Laravel release to cut debugging costs and speed up iterations?"
Why Trap Over Alternatives?
| Feature | Trap | Symfony Dumper | Sentry | Laravel Telescope | Xdebug + IDE |
|---|---|---|---|---|---|
| Protobuf Support | ✅ (Human-readable) | ❌ | ❌ | ❌ | ❌ |
| HTTP/SMTP Traps | ✅ (Raw inspection) | ❌ | ❌ | ❌ | ❌ |
| No Docker | ✅ (Pure PHP) | ✅ | ❌ (Cloud) | ❌ (Laravel-only) | ✅ |
| CI/CD Integration | ✅ (CLI + Phar) | ❌ | ✅ (Cloud) | ❌ | ❌ |
| Monolog/Sentry | ✅ (Unified view) | ❌ | ❌ (Separate) | ❌ | ❌ |
| Performance | ~5–10ms/dump | ~1ms | N/A | ~2ms | ~50ms (IDE overhead) |
Key Differentiators:
dump()/dd() with trap()—zero config.
// Before
dd($user->toArray()); // Clunky, no depth control
// After
trap($user)->depth(2); // Compact, interactive
trap()->mail()).tr(): Trace + return (like dd() but faster).td(): Trace + die (for debugging loops).vendor/bin/trap in GitHub Actions to auto-capture debug data on test failures.Migration Path:
composer require --dev buggregator/trap.dd() calls with trap() and measure time saved.Risks/Mitigations:
trap() vs. dump().How can I help you explore Laravel packages today?