zendframework / zend-expressive

PSR-15 middleware in minutes!
BSD 3-Clause "New" or "Revised" License
711 stars 197 forks source link

Debug toolbar conversation #181

Closed harikt closed 8 years ago

harikt commented 8 years ago

This was from thread #180 . Just wanted to make another thread so the discussion don't get lost

harikt : There need some sort of way to debug things easily. Eg : Middleware when is it called, is it registered etc something like the symfony debug bar which helps to show the event handlers registered / called. ( feature )

mwop : something like the symfony debug bar

That's what Z-Ray is for… Seriously, though, there are lot's of such debug toolbars out there. It sucks that most are not generic, and need to be built for the specific project. That's one thing I like about Z-Ray; generic, and pluggable. We're already working on a PSR-7 plugin for it, and will likely build one around middleware signatures (though that one's far harder, as most are not implementing an interface, so we have to look at arguments).

harikt commented 8 years ago

@weierophinney correct me if I am wrong.

I haven't used it to tell more about it.

UPDATE : Haven't used means not used it on my own project and not looking at demo http://serverdemo.zend.com/magento/ :) .

geerteltink commented 8 years ago

It is free now and you can use it without zend server: http://www.zend.com/en/products/z-ray/z-ray-preview

It only works on linux and mac though. Still waiting for windows.

I'm wondering what the preferred way of communication is for questions like this. This has nothing to do with zend-expressive. Shouldn't this be asked on IRC or stackexchange?

harikt commented 8 years ago

cool. Thank you @xtreamwayz . Free now doesn't mean free for ever. I am not asking for the same for it have its own limitations to give it for free.

The reason I added is I thought it will be good for expressive to have some sort of functionality which helps developing / debugging things easy. If you feel this is not the right place, we can move the conversation to some place which is better. Oh irc no for people come and go, this is for discussion of a single topic.

geerteltink commented 8 years ago

You know that the whoops error handler can optionally be installed with the skeleton right? It's not a toolbar, but it does give a lot of info about exceptions.

harikt commented 8 years ago

You missed my point.

Does whoops shows the middlewares registered ?

Does whoops shows the middleware called on the execution?

Does whoops shows the middleware that are not called ?

Whoops is just an error handler :) .

Hari K T

You can ring me : +91 9388 75 8821

http://harikt.com , https://github.com/harikt , http://www.linkedin.com/in/harikt , http://www.xing.com/profile/Hari_KT

Skype : kthari85 Twitter : harikt

On Thu, Nov 5, 2015 at 12:53 PM, Geert Eltink notifications@github.com wrote:

You know that the whoops error handler can optionally be installed with the skeleton right? It's not a toolbar, but it does give a lot of info about exceptions.

— Reply to this email directly or view it on GitHub https://github.com/zendframework/zend-expressive/issues/181#issuecomment-153976390 .

shochdoerfer commented 8 years ago

Prophiler and our Prophiler PSR-7 middleware might be another idea to play with. Just giving you options ;)

geerteltink commented 8 years ago

@shochdoerfer I tried it, but couldn't get it working. I might have done something wrong. I added the prophiler to the middleware_pipeline. I think the issue was that once an Action returns a HtmlResponse, it doesn't trigger the next callable.

A solution might be to add this in the index.php file, create a middleware app with the prophiler and wrap that around the application itself. But I haven't tried that yet.

harikt commented 8 years ago

I tried z-ray and I like it. I don't know whether it will be free or how the plans are.

I will also look into Prophiler middleware.

Thank you @shochdoerfer

shochdoerfer commented 8 years ago

@xtreamwayz Would you mind opening an issue here? Some sample code that did not work would be nice ;)

geerteltink commented 8 years ago

@shochdoerfer Once the toolbar is loading for PHP 7 I don't mind playing with it again and provide some code: fabfuel/prophiler#47

snapshotpl commented 8 years ago

There is also another debug bar middleware https://github.com/php-middleware/phpdebugbar