[wp-trac] [WordPress Trac] #49780: Adding a "die and dump" debug helper function

WordPress Trac noreply at wordpress.org
Thu Apr 2 12:54:41 UTC 2020


#49780: Adding a "die and dump" debug helper function
-----------------------------+-----------------------------
 Reporter:  jeffreyvr        |      Owner:  (none)
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  trivial          |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Inspired by Laravel, I was wondering, if it was ever considered to add a
 comparable function like dd()  (die dump) to WordPress as well.

 The function accepts a parameter that can be a mix of types (string,
 object, array etc.) and prints it out in a readable fashion.

 [[Image(https://i.imgur.com/HIcbShA.png)]]

 I think that it would be a handy function for developers who are
 debugging. Could be named wp_dd() perhaps.

 I would consider contributing it to core myself (have no prior experience
 with that), but maybe it was already discussed before and decided against
 the idea.

 https://laravel.com/docs/7.x/helpers#method-dd

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49780>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list