this looks amazing... I can't wait to try it out (at work I can't SSH to my server... sadly IT wins... this time) ;)
Seconded, definitely need to check this one out
barryvdh, thanks for this very needed package. I just have one question which I wasn't able to find the answer to by reading the documentation of maxime's debugbar nor on the old forum thread. How / where do I configure the bar? specifically, I am trying to enable the (optional) displaying of shared data for views, and in general, to see the dump of all the data I am passing to the views and the request/response data. I am trying to debug some old input / session data loss issue and having that data available would help a lot.
Or maybe I am doing it wrong and maybe I need to kind of dump it through message (maybe in some place where it'll be enabled for all requests)? Please advise ... :-)
@mbariola Once you have added debugbar to your apps providers array you can use the following command php artisan debugbar:publish
on the command line to copy the debugbars default config file to app/config/packages/barryvdh/laravel-debugbar/config.php
from where you can enable/disable certain parts of the debug bar.
@carbontwelve , I have both the publish command on the composer setup and I ran it manually. I do have a packages dir, but only a .gitkeep file in it. Permissions seem ok and indeed the bar works, but the app/config/packages dir does not contain barrydvh/laravel-debugbar/config.php
carbontwelve said:
@mbariola Once you have added debugbar to your apps providers array you can use the following command
php artisan debugbar:publish
on the command line to copy the debugbars default config file toapp/config/packages/barryvdh/laravel-debugbar/config.php
from where you can enable/disable certain parts of the debug bar.
Is it possible to collect and show query result rows?
Also, PhpInfoCollector doesn't seem to work for me?
Debugbar:publish is for assets, use 'php artisan config:publish barryvdh/laravel-debugbar' for the config. Then the config file will be published. The php info collector doesn't do anything (yet)
And yes, query results are collected.
Hello @barryvdh ,
perfect, I got my shiny config file to play with. Thanks!
Anyone know how can I add a collector that listens to ONLY eloquent model events?
You've done great on this. But I was wondering if you can tell me what's included in the "booting" sequence of the Timeline result? I find Laravel very slow to "boot". I have response times of around 200-250ms in my dev environment (I have a fast computer), and that's just way too slow I feel. The applicaiton part is only 40ms.
I've found that artisan optimize cuts the boot time by about 20%. That's great, but it's still around 140-150ms for booting of Laravel and its components. I also don't run the optimize command in dev of course.
If this not something you can answer, I wonder if not Taylor should release a "bare bone" package like you can with Twitter Bootstrap 3. Just pick the components you want...
@Stolz, you can just do something like this:
$dispatcher = $this->app['events'];
Event::listen('eloquent.*', function(){
$event = Event::firing();
Debugbar::info("Received event: ". $event);
});
@CedNet: I think booting is everything until the router kicks in, you could try disabling some service providers to make it faster.
Thanks, did comment out a few unused ones but really that's only like 2-3 out of the 20-ish total service providers. Things did improve though by 10-20ms on average.
Laravel should be able to do a lot, but I'm starting to feel the Laravel core is getting a bit heavy.
I added some Twig extensions, for the ones using that:
Laravel Debugbar comes with two Twig Extensions. These are tested with rcrowe/TwigBridge 0.6.x
Add the following extensions to you TwigBridge config/extensions.php (or register the extensions manually)
'Barryvdh\Debugbar\Twig\Extension\Debug',
'Barryvdh\Debugbar\Twig\Extension\Stopwatch',
The Debug extension will replace the dump function to output variables to the Messages, instead of showing it directly in the template. It dumps the arguments, or when empty; all context variables.
{{ dump() }}
{{ dump(user, categories) }}
The Stopwatch extension adds a stopwatch tag similar to the one in Symfony/Silex Twigbridge.
{% stopwatch "foo" %}
... some things that gets timed
{% endstopwatch %}
I've pushed a new update which no longer requires the assets to be published, give it a try! :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community