![]() |
Something like laravel "dd" function - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29) +--- Thread: Something like laravel "dd" function (/showthread.php?tid=66846) Pages:
1
2
|
Something like laravel "dd" function - CodeIgnitedX - 12-10-2016 I miss something like "dd" function in laravel to print the object's tree and vars. RE: Something like laravel "dd" function - PaulD - 12-10-2016 What is wrong with print_r and var_dump ? http://php.net/manual/en/function.print-r.php http://php.net/manual/en/function.var-dump.php If it is the formatting on screen output try viewing the page source, much cleaner. RE: Something like laravel "dd" function - CodeIgnitedX - 12-10-2016 I'm sorry, but print_r and var_dump are very simples, in large objects are very tedious debug. Please see that link http://laraveldaily.com/echoing-dd-vs-var_dump-vs-print_r/ I'm codeigniter fanatic but we should recognize the good work in another frameworks. Regards. RE: Something like laravel "dd" function - PaulD - 12-10-2016 That post seems to be saying that dd is a PITA. I admit that when debugging very large arrays it is a pain to decipher the content sometimes. But I just do not understand the need for dd at all. I suppose it might be handy in some contexts. It reminds me of exploring objects in a browser console, which I always find a pain. Probably because I do not do it enough. There is no equivalent of DD in CI. Perhaps you could write one. It does not seem to be a particularly complex function, although I bet it gets complicated when you start taking into account edge cases. Personally, if you are analysing an array of substantial size to debug something, I would always break code down into smaller chunks which are more manageable. Quote:we should recognize the good work in another frameworks. I totally agree with you on this. But I am still failing to see the benefit of dd https://laracasts.com/discuss/channels/general-discussion/the-new-dd-in-laravel-5-is-kind-of-shitty RE: Something like laravel "dd" function - ivantcholakov - 12-10-2016 If you need something anyway, you may try https://github.com/CesiumComputer/print_d RE: Something like laravel "dd" function - InsiteFX - 12-10-2016 Or the old CI Favorite as a helper method: PHP Code: /** RE: Something like laravel "dd" function - kenjis - 12-11-2016 If you like the output like dd, you can use http://symfony.com/doc/current/components/var_dumper.html with Composer. RE: Something like laravel "dd" function - paulkd - 12-11-2016 (12-10-2016, 03:38 AM)CodeIgnitedX Wrote: I miss something like "dd" function in laravel to print the object's tree and vars. It's not been maintained since 2007, but I use this little class file dBug ![]() RE: Something like laravel "dd" function - skunkbad - 12-11-2016 I use FirePHP. Gives me all the debugging data I need, and doesn't stop execution like dd does. RE: Something like laravel "dd" function - John_Betong - 12-11-2016 Try this: https://forum.codeigniter.com/thread-65568.html |