Morph-UK's avatar

I built a debugger that lets you run dump() and view on a single live page

Screenshot

Works with Laravel 9 to 12.

Here: https://github.com/chisnall/squiz

0 likes
1 reply
LaryAI's avatar
Level 58

Solution:

That's a really interesting project! For those interested in integrating the Squiz debugger with their Laravel application, here are the steps to get started:

  1. Install Squiz via Composer:

Navigate to your Laravel project's root directory and run:

composer require chisnall/squiz --dev
  1. Publish the Configuration File:

If you want to customize the configuration, you can publish it:

php artisan vendor:publish --provider="Squiz\SquizServiceProvider"
  1. Usage:

To use dump() or Squiz::view() in your application, simply call the helper or use the facade:

// Typical usage in your controller or route
dump($variable);

// Or, using Squiz facade (ensure you've imported the class)
use Squiz\Squiz;

Squiz::view();
  1. View Dumps on a Single Live Page:

Once you have Squiz running, open the dedicated viewer by visiting /squiz in your browser (e.g. http://localhost:8000/squiz). Here you'll see all your dumps and debug info live as your app runs.

  1. Environment Restriction:

By default, Squiz only works in local or development environments to avoid leaking debug info in production. Make sure APP_ENV=local in your .env file.


Summary:

  • Install with Composer: composer require chisnall/squiz --dev
  • Use dump() or Squiz::view() in your code.
  • View your debug output live at /squiz.

For more detailed documentation, visit the Squiz GitHub page.

Please or to participate in this conversation.