Plugin Directory

Test out the new Plugin Directory and let us know what you think.


Debug trace for WordPress, including action and filter tracing

Debug trace for WordPress, including ad hoc action hook and filter tracing.

  • The primary purpose of debug trace is to help in the development of PHP code: plugins or themes.
  • The primary purpose of action trace is to help you understand the sequence of events in the server.
  • The primary purpose of ad hoc tracing is to let you see what's happening without changing any code.
  • This plugin provides the admin interface to trace functions and methods and action and filter tracing.

Except for HTML comments, oik bwtrace does not alter the output of your web pages. Output is written to files on the server which you can browse in a separate window.

You can also use the oik trace facilities to assist in problem determination in a live site.


  • Traces ALL server functionality, including AJAX and other background requests
  • Ability to choose the IP address to trace, defaults to ALL requests
  • Trace AJAX transactions separately, if required
  • Supports ad hoc tracing of user defined hooks
  • Action trace counts help you understand the sequence of actions and filters
  • Provides contextual information
  • Minimum performance overhead when tracing is not enabled
  • Tracing can be enabled programmatically
  • Traces and backtraces PHP Error, Warning and Notice messages
  • Backtraces deprecated logic messages
  • Writes summary trace record for each transaction into a daily log
  • Does not require WP_DEBUG to be defined
  • Dynamically activates trace functions
  • Implemented as lazy just-in-time code
  • Can be used during regression testing
  • Can be activated in wp-config.php and db.php to trace code before WordPress is fully loaded
  • Plugin does not need to be activated if started programmatically or from wp-config.php
  • Operates as a standalone plugin; independent of the oik base plugin
  • Integrated with oik-lib shared library management
  • Easy to code APIs: bw_trace2(), bw_backtrace() and bw_trace()
  • API supports multiple trace levels

Ad hoc tracing allows you to:

  • trace parameters
  • trace results
  • trace registered functions
  • trace the global post
  • set the priority for the trace hook
  • debug backtrace hook invocation

The trace record output can include:

  • Fully qualified source file name
  • Trace record count
  • Time stamp
  • Current filter information
  • Number of database queries that have been performed.
  • Current post ID
  • Current and peak memory usage (in bytes)
  • Files loaded count
  • Contextual information

The output for action tracing can include trace records showing:

  • Count of action hooks and filters
  • Invocation of the 'wp' actions
  • Contents of the global wp_rewrite for the 'wp' action
  • Summary reports at 'shutdown'
  • Information about deprecated logic
  • Information related to Errors, Warnings and Notices

New in v2.0.8

  • Ad hoc debug backtrace for selected hooks

New in v2.0.7

  • Ability to control tracing of AJAX transactions

New in v2.0.6

  • Parameters passed to user selected hooks
  • Returned values from user selected filters
  • Current status of the global post object for user selected hooks
  • Information about attached hook functions for user selected hooks

If you select "Trace 'shutdown' status report and log in summary file" then you also get a daily summary log, named bwtrace.vt.mmdd

The summary daily log contains information that can be used for performance analysis. This log is produced even when tracing is not enabled.

See also:

Requires: 4.2 or higher
Compatible up to: 4.4.8
Last Updated: 1 year ago
Active Installs: 10+


5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.