im just creating a API with json data output. i observed that when json data is returned to browser there is no laravel-debug bar. but when a string is returned then there is debugbar
That is correct. Adding html to a json response would break the json.
It would be waves though in the history of the debugbar. Also, if you make Ajax request from a page with the debugbar, it should show the info.
However it would be nice if we could easily enable/disable it.
But always enabling and disabling it time consuming?
If it is something simple I dont think it would be time consuming.
For example:
if (env('APP_DEBUG')) {
Debugbar::debugJSON();
}
does exists a chrome plugin for this case? So I can see the debugbar even for json
Most helpful comment
does exists a chrome plugin for this case? So I can see the debugbar even for json