Laravel-debugbar: no debugbar when json data is returned.

Created on 23 Mar 2015  路  5Comments  路  Source: barryvdh/laravel-debugbar

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

Most helpful comment

does exists a chrome plugin for this case? So I can see the debugbar even for json

All 5 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MRZ2017 picture MRZ2017  路  3Comments

thomthom picture thomthom  路  5Comments

lucasdcrk picture lucasdcrk  路  3Comments

Megachill picture Megachill  路  3Comments

truongthaison picture truongthaison  路  4Comments