oik-bwtrace

Descripción

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.
  • The primary purpose of ‘string watch’ is to track the source of some output.
  • This plugin provides the admin interface to trace functions and methods and action and filter tracing.

oik bwtrace does not alter the output of your web pages though there are options
which cause some output to be written to the browser during ‘shutdown’ processing.

You can also use the oik trace facilities to assist in problem determination in a live site.
Output is written to files on the server in a user defined trace files directory.
When tracing a live or staging site you should ensure that the trace files directory is not publicly accessible.

Features:

  • Traces to a defined Trace files directory
  • Traces ALL server functionality, including AJAX, REST and other background requests
  • Writes summary trace record for each transaction into Daily Trace summary files
  • Traces browser transactions separately, if required
  • Traces AJAX transactions separately, if required
  • Traces REST requests separately, if required
  • Traces CLI requests separately, if required
  • Ability to choose the IP address to trace, defaults to ALL requests
  • 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
  • Does not require WP_DEBUG to be defined
  • Does not require SAVEQUERIES 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
  • Integrated with oik-lib shared library management
  • Easy to code APIs: bw_trace2(), bw_backtrace().
  • 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
  • perform ‘string watch’ to watch for a particular string

The trace record output can include:

  • Fully qualified source file name
  • Trace record count and trace error count
  • Time stamp
  • Current filter information
  • Hook count
  • 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 v3.4.0

  • Experimental Performance trace option
  • Experimental front end links to trace file and daily trace summary

Is there a tutorial?

See this page and short video
Introduction to oik-bwtrace

Can I get support?

Use the contact form on the oik-plugins website.

How can I contribute?

[github bobbingwide oik-bwtrace]

Further reading

If you want to read more about the oik plugins then please visit the
oik plugin
“the oik plugin – for often included key-information”

Capturas

  • Trace files directory box
  • Trace options - Requests sections
  • Trace options - Trace records
  • Daily Trace Summary box
  • Action options - Options
  • Action options - Ad hoc tracing
  • Trace information box
  • Raw trace output
  • Daily Trace Summary file

Instalación

  1. Upload the contents of the oik-bwtrace plugin to the `/wp-content/plugins/oik-bwtrace’ directory
  2. Activate the oik-bwtrace plugin through the ‘Plugins’ menu in WordPress
  3. Define your trace options using Settings > oik trace options
  4. Define your action trace options using Settings > oik action options
  5. Don’t forget to disable tracing when you no longer need it
  6. Don’t forget to purge the trace output when you no longer need it

Preguntas frecuentes

Where is the FAQ?

oik-bwtrace FAQ

Where is the documentation?

oik-bwtrace – debug trace for WordPress

Reseñas

3 de septiembre de 2016
With the addition of Ad hoc tracing and the fact that oik-bwtrace doesn't affect what's displayed on the front end(*) oik-bwtrace is my GO TO plugin for problem determination... finding out what's really going on. Most of the other debugging plugins only work on the front end and alter what's sent to the browser. (*) With some minor exceptions.
Leer toda la 1 reseña

Colaboradores y desarrolladores

Este software es de código abierto. Las siguientes personas han contribuido a este plugin.

Colaboradores

"oik-bwtrace" ha sido traducido a 1 idioma local. Gracias a los traductores por sus contribuciones.

Traduce "oik-bwtrace" a tu idioma.

¿Interesado en el desarrollo?

Revisa el código, echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

3.4.0

  • Changed: Previous change history moved to changelog.txt
  • Added: Added display trace file links option #110
  • Changed: Reconcile shared libraries
  • Fixed: Avoid Fatal at shutdown for heartbeat requests not being traced #109
  • Added: Experiment with only tracing scalar data when performance tracing #109
  • Added: Load options from JSON files if available #109
  • Added: Support tracing to memory when performance_trace is ‘on’ #109
  • Added: Add BW_TRACE_START_TIMESTAMP timing point #109
  • Fixed: Update languages. Adjust tests for newly translated strings #87 #109
  • Added: Add class trace_json_options and Enable performance trace checkbox #109
  • Changed: Update bw_action do page tests #87
  • Tested: With WordPress 6.0.1 and WordPress Multi Site
  • Tested: With PHPUnit 9
  • Tested: With PHP 8.0