Ray is a beautiful, lightweight desktop app that helps you debug your app. There’s a free demo available that can be unlocked with a license.
After installing this plugin, you can use the
ray() function to quickly dump stuff. Any variable(s) that you pass to
ray() will be displayed.
Here some examples:
ray(['a' => 1, 'b' => 2])->color('red');
ray('multiple', 'arguments', 'are', 'welcome');
There are many other helper functions available on Ray that allow you to display things that can help you debug such as runtime and memory usage, queries that were executed, and much more.
The extensive documentation can be found here.
It contains the installation instructions for WordPress.
After it is installed you can use any of the framework agnostic and WordPress specific functions.
Ler todas as 7 avaliações
Makes debugging a breeze without dumping out information to the screen. So simple to setup that is is just as easy as doing a var_dump and has so many more features.
If you are constantly writing var_dump() or error_log() to debug your code you'll know it gets painful when debugging larger and more complex code. Using Ray is the simple way to debug without the hassle of reading through Log files or half rendered / broken pages on the browser. A couple of hours of using Ray and you will have recouped the cost in lost time.
I was having trouble debugging an issue in my WP Cron task. It's quite complex and calls out to an external database in multiple places, so trying to figure out where the issue was started driving me insane.
As there was a PHP error in my code (I was trying to call a method on null) my logger wasn't picking up any issues, nor was it even logging sometimes and no exceptions were being thrown.
After installing Ray it worked right away with no setup (other than installing it with Composer). I then managed to find the issue in about 5 minutes because of Ray's simplicity and speed in giving you the output.
The UI is minimal which is perfect as nothing gets in your way while trying to debug and having everything formatted beautifully is a massive win over basic debug logging.
I bought a licence right away and would have happily paid 2x the price I did.
Amazingly simple yet powerful 👌
Absolutely worth the price
It's much easier to use Ray than do all the error_log() and var_dump() calls on a page. You do not interrupt the flow (but you can pause it!) although receive all the needed information.
It's less powerful than Xdebug (although they have different purposes and use cases), but more flexible than printing debug output on a page/debug-bar/error log.
I highly recommend it.
The WordPress equivalent of dd() & xDebug.
Thanks for bringing some of the good PHP stuff to the WordPress ecosystem!
I had to write my own debug function plugin before when working on WordPress, but Ray is much nicer to use!
“Ray” é software de código aberto. As seguintes pessoas contribuíram para este plugin:Contribuidores