WordPress.org

Make WordPress Core

Opened 10 hours ago

Closed 8 hours ago

#49780 closed feature request (duplicate)

Adding a "die and dump" debug helper function

Reported by: jeffreyvr Owned by:
Milestone: Priority: normal
Severity: trivial Version:
Component: General Keywords:
Focuses: Cc:

Description

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.

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

Change History (1)

#1 @SergeyBiryukov
8 hours ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the ticket, we're already tracking this enhancement in #43292.

Note: See TracTickets for help on using tickets.