Skip to content

Official client for debugging WordPress with xrDebug

License

Notifications You must be signed in to change notification settings

xrdebug/wordpress

Repository files navigation

xrDebug WordPress Plugin

xrDebug

Build Code size MIT PHPStan

Summary

WordPress plugin for debugging with xrDebug. This plugin uses the xrDebug PHP library and it adds WordPress-specific features.

Installation

  1. Go to latest release and download xrdebug.zip.
  2. Go to your WordPress admin panel, click on Plugins and then Add New.
  3. Click on Upload Plugin and select the downloaded zip file.
  4. Click on Install Now and then Activate.

Debug Helpers

In addition to the PHP xrDebug helpers this plugin adds the following WordPress-specific debug helpers.

wp_xri

Use function wp_xri to access the xrDebug WordPress inspector instance, which can be used to control the WordPress inspector logging features.

Method Toggles
showErrors Showing errors
showHooks Showing hooks
showMails Showing emails
showQueries Showing queries

showErrors

Use method showErrors to show the PHP errors during the WordPress request.

wp_xri()->showErrors();

To stop showing errors pass FALSE as argument.

wp_xri()->showErrors(FALSE);

showHooks

Use method showHooks to show the WordPress hooks executed during the WordPress request.

wp_xri()->showHooks();

To stop showing hooks pass FALSE as argument.

wp_xri()->showHooks(FALSE);

showMails

Use method showMails to show the emails sent during the WordPress request.

wp_xri()->showMails();

To stop showing emails pass FALSE as argument.

wp_xri()->showMails(FALSE);

showQueries

Use method showQueries to show the SQL queries executed during the WordPress request.

wp_xri()->showQueries();

To stop showing queries pass FALSE as argument.

wp_xri()->showQueries(FALSE);

License

Copyright Rodolfo Berrios A.

This software is licensed under the MIT License. See LICENSE for the full license text.