Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gitwithravish's avatar

Best practices to debug in production

I am having some hard time debugging api and project in production. My laravel version is old (5.4), so i cannot use debugbar as well.

In local we can quickly dd() variables and see whats going on.

But in production, I feel stuck. Everytime i have to do some changes, push, deploy and test. This is very tedious.

Can anyone experienced suggest good practices/packages ?

0 likes
1 reply
Nakov's avatar

Laravel debugbar is available even before Laravel 5.4, but it is not good to use it on production since all of your users will see the debugbar.

I've used Laravel Telescope before, and allowed in the gate to be accessable only to my email: https://laravel.com/docs/8.x/telescope#dashboard-authorization

And also hit play on telescope exactly when you are going to debug, and not all the time, since it will store logs in your database. Or you could have it run all the time, but schedule a command to prune the tables once a day or on 2 days: https://laravel.com/docs/8.x/telescope#data-pruning

1 like

Please or to participate in this conversation.