I am working on json rest api.
Is there a feature how can I use Debugbar directly without using a blade? Because for me to see the debugbar output, I need to return a view from the controller.
I am hoping that I can do something to directly output debugbar instead creating a blade file just to output debugbar.
I am thinking something like this:
Debugbar::info($data1);
Debugbar::info($data2);
Debugbar::info($data3);
Debugbar::renderAndStop();
// or return it from controller
return Debugbar::render();
// or lets make a dd in debugbar
Debugbar::dd($data);
You can just return a string 'ok' for example
really? I will try it if works.
@barryvdh , this works but only if you are inside the controllers,.. what if you are inside the other classes or sevices, and on that certain line or breakpoint you want to profile the runtime especially the queries,. how are you going to do it?
For me, I suggest like Debugbar::renderAndStopProfiler().. what do you think?
you may think of better method name.
This really speeds up debugging especially query optimizations especially in api development.
I think it would be awesome to rely on something similar as dd, maybe a ddebug helper :grin:.
Perhaps a ddb, ddbar 馃榿 ...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.