🚀 Available for Freelance, Remote, and Full-Time Opportunities. Let's build something amazing together.

News
1 min read

Artisan Debugging Commands in Laravel Telescope 5.24.0

Laravel Telescope 5.24.0 introduces new CLI artisan commands to inspect logs, stream database queries in real-time, and manage storage directly from the terminal.

A

Author

3 weeks ago

CLI Debugging in Laravel Telescope 5.24.0

While Laravel Telescope's web dashboard is beloved by developers, logging into a remote staging server often means working purely within a terminal session. Telescope 5.24.0 introduces dedicated CLI commands that bring Telescope's telemetry directly into your terminal.

New Artisan Commands

  • php artisan telescope:tail: Stream outgoing queries, executed jobs, and thrown exceptions directly to stdout in real time.
  • php artisan telescope:slow-queries: Lists the slowest database queries recorded in Telescope with execution times and call traces.
  • php artisan telescope:prune --tag=billing: Prune entries matching specific tags or time ranges without wiping the entire Telescope database.
# Stream slow queries live during load testing
php artisan telescope:tail --filter=queries --slow-only
# [0.482s] SELECT * FROM orders WHERE status = 'pending' (App\Actions\ProcessOrders:34)
# [0.612s] UPDATE inventory SET stock = stock - 1 (App\Services\CheckoutService:88)