Laravel-swoole: Laravel PHP Debugbar not working

Created on 1 Jun 2018  ·  4Comments  ·  Source: swooletw/laravel-swoole

PHP v 7.1.9
Laravel: 5.6

PHP Debugbar is a useful tool that helps you understand the memoray usage and debug queries etc. It looks like the Laravel extension for it is not working with Laravel-Swoole:
https://github.com/barryvdh/laravel-debugbar

Do I need to configure something to make it work?

question

Most helpful comment

Hi @aftabnaveed ,

I don't think laravel-debugbar can 100% work with this package.

  1. laravel-debugbar won't be enabled in cli mode. (see: https://github.com/barryvdh/laravel-debugbar/blob/master/src/LaravelDebugbar.php#L760)
  2. Even if I forced to enable the debugbar manually, there's still app container pollution problem.
  3. To resolve app container pollution, I tried to add the service provider of laravel-debugbar to re-register list but only few collectors work.
  4. Some collectors won't be available with this package. For example, application booted only in the first time, so it's impossible to get booted time on every request in this case.

All 4 comments

Hi @aftabnaveed ,

I don't think laravel-debugbar can 100% work with this package.

  1. laravel-debugbar won't be enabled in cli mode. (see: https://github.com/barryvdh/laravel-debugbar/blob/master/src/LaravelDebugbar.php#L760)
  2. Even if I forced to enable the debugbar manually, there's still app container pollution problem.
  3. To resolve app container pollution, I tried to add the service provider of laravel-debugbar to re-register list but only few collectors work.
  4. Some collectors won't be available with this package. For example, application booted only in the first time, so it's impossible to get booted time on every request in this case.

Do you recommend any profiler that can be used with Swoole?

Hi @aftabnaveed ,

I haven't tried any profiler on Swoole yet. Maybe you can try if Xdebug or php-spx works on Swoole.

But as far as I know, Xdebug doesn't support Swoole's coroutine environment. It should work on Swoole 1.x.

Xdebug works with swoole version 2.x. Stable Version 4.0 is not yet released so it does not make sense to use that at this time. I will close this issue now. Thanks for your help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

storyn26383 picture storyn26383  ·  5Comments

mfauveau picture mfauveau  ·  5Comments

junshenshi picture junshenshi  ·  3Comments

adon988 picture adon988  ·  5Comments

MikeMaldini picture MikeMaldini  ·  10Comments