The team at Sentry recently published a helpful guide on how to get the most out of Laravel’s built-in debugging and logging tools in development, and how to use Sentry to debug Laravel applications in production effectively.
While Laravel ships with a host of excellent debugging tools, knowing how and when to use the right tool—whether in development, staging, or production—can make the difference between quickly fixing issues and leaving problems hidden.
It also explores popular tools such as Laravel Debugbar, Telescope, and Xdebug, along with best practices for production environments. The guide walks you through setting up Sentry to send logs to Sentry, defining scope for authenticated users to tie users to data in Sentry, using custom tags to track events, and detecting poor performance in production.
What you’ll learn:
- How Laravel uses Monolog for flexible, configurable logging
- Which debugging tools work best for development (Debugbar, Telescope, Xdebug)
- How to log and detect slow queries in your application
- Why structured logs and error reporting are critical in production
- How Sentry’s Laravel SDK can improve visibility and context for errors
For the complete article and code examples, check out Sentry’s original post: Debugging and logging in Laravel applications.